From f5d6b8438159952c840865229221fa5a1297afe2 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 26 Jan 2023 14:29:28 +0900 Subject: [PATCH] chore: check emoji host --- packages/backend/src/core/CustomEmojiService.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/backend/src/core/CustomEmojiService.ts b/packages/backend/src/core/CustomEmojiService.ts index 1f0b21415..169b7892e 100644 --- a/packages/backend/src/core/CustomEmojiService.ts +++ b/packages/backend/src/core/CustomEmojiService.ts @@ -44,11 +44,13 @@ export class CustomEmojiService { type: data.driveFile.webpublicType ?? data.driveFile.type, }).then(x => this.emojisRepository.findOneByOrFail(x.identifiers[0])); - await this.db.queryResultCache!.remove(['meta_emojis']); + if (data.host == null) { + await this.db.queryResultCache!.remove(['meta_emojis']); - this.globalEventService.publishBroadcastStream('emojiAdded', { - emoji: await this.emojiEntityService.pack(emoji.id), - }); + this.globalEventService.publishBroadcastStream('emojiAdded', { + emoji: await this.emojiEntityService.pack(emoji.id), + }); + } return emoji; }