diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts index 6c4c8d0e6..22bedc710 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/update.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/update.ts @@ -76,7 +76,7 @@ export default class extends Endpoint { }); } else { this.globalEventService.publishBroadcastStream('emojiDeleted', { - emojis: [ emoji ], + emojis: [ await this.emojiEntityService.pack(emoji) ], }); this.globalEventService.publishBroadcastStream('emojiAdded', { diff --git a/packages/frontend/src/custom-emojis.ts b/packages/frontend/src/custom-emojis.ts index 5b13176cd..b080eca40 100644 --- a/packages/frontend/src/custom-emojis.ts +++ b/packages/frontend/src/custom-emojis.ts @@ -17,7 +17,9 @@ export const customEmojiCategories = computed(() => { fetchCustomEmojis(); stream.on('emojiAdded', emojiData => { - customEmojis.value = [ emojiData.emoji, ...customEmojis.value ] + setTimeout(() => { + customEmojis.value = [ emojiData.emoji, ...customEmojis.value ] + }, 100); }); stream.on('emojiUpdated', emojiData => { @@ -25,7 +27,7 @@ stream.on('emojiUpdated', emojiData => { }); stream.on('emojiDeleted', emojiData => { - customEmojis.value = customEmojis.value.filter(item => !emojiData.emojis.some(search => search.name === item.name)) + customEmojis.value = customEmojis.value.filter(item => !emojiData.emojis.some(search => search.name === item.name)); }); export async function fetchCustomEmojis() {