feat(streaming): Add emoji added event

This commit is contained in:
syuilo
2020-04-02 22:17:17 +09:00
parent 4a6b0edce6
commit 9e9d378bf1
4 changed files with 24 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import { insertModerationLog } from '../../../../../services/insert-moderation-l
import { ApiError } from '../../../error';
import { ID } from '../../../../../misc/cafy-id';
import rndstr from 'rndstr';
import { publishBroadcastStream } from '../../../../../services/stream';
export const meta = {
desc: {
@ -53,6 +54,10 @@ export default define(meta, async (ps, me) => {
await getConnection().queryResultCache!.remove(['meta_emojis']);
publishBroadcastStream('emojiAdded', {
emoji: await Emojis.pack(emoji.id)
});
insertModerationLog(me, 'addEmoji', {
emojiId: emoji.id
});