backend: Append new emoji to cache immediately

This commit is contained in:
ltlapy 2023-02-18 18:39:05 +09:00
parent 50ef33845c
commit 8a9a39de35

View file

@ -60,6 +60,9 @@ export class CustomEmojiService {
if (data.host == null) {
await this.db.queryResultCache!.remove(['meta_emojis']);
//this.prefetchEmojis([{name: data.name, host: null}]);
this.cache.set(`${data.name} ${data.host}`, emoji);
this.globalEventService.publishBroadcastStream('emojiAdded', {
emoji: await this.emojiEntityService.pack(emoji.id),
});