mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-26 22:29:28 +09:00
投票受信
This commit is contained in:
parent
520a0b6949
commit
1ddad0d440
@ -15,6 +15,7 @@ import { ITag } from './tag';
|
||||
import { toUnicode } from 'punycode';
|
||||
import { unique, concat, difference } from '../../../prelude/array';
|
||||
import { extractPollFromQuestion } from './question';
|
||||
import vote from '../../../services/note/polls/vote';
|
||||
|
||||
const log = debug('misskey:activitypub');
|
||||
|
||||
@ -111,6 +112,12 @@ export async function createNote(value: any, resolver?: Resolver, silent = false
|
||||
// テキストのパース
|
||||
const text = note._misskey_content ? note._misskey_content : htmlToMFM(note.content);
|
||||
|
||||
// vote
|
||||
if (reply && reply.poll && text != null && text.match(/^[0-9]$/)) {
|
||||
await vote(actor, reply, Number(text));
|
||||
return null;
|
||||
}
|
||||
|
||||
const emojis = await extractEmojis(note.tag, actor.host).catch(e => {
|
||||
console.log(`extractEmojis: ${e}`);
|
||||
return [] as IEmoji[];
|
||||
|
Loading…
Reference in New Issue
Block a user