diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-09-25 10:29:12 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-09-25 10:29:12 +0900 |
| commit | 5318532a8d1208b4f286856e98ff199bfdeacb9c (patch) | |
| tree | 9825d491cee6fc46dae57f548ee6a9f5ccff616b /packages/backend/src/core/CustomEmojiService.ts | |
| parent | Add address bind config option (outgoingAddress) is feature of 2023.9 (#11894) (diff) | |
| download | sharkey-5318532a8d1208b4f286856e98ff199bfdeacb9c.tar.gz sharkey-5318532a8d1208b4f286856e98ff199bfdeacb9c.tar.bz2 sharkey-5318532a8d1208b4f286856e98ff199bfdeacb9c.zip | |
enhance: improve moderation log
Diffstat (limited to 'packages/backend/src/core/CustomEmojiService.ts')
| -rw-r--r-- | packages/backend/src/core/CustomEmojiService.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/backend/src/core/CustomEmojiService.ts b/packages/backend/src/core/CustomEmojiService.ts index b14a8666e6..1b545a124e 100644 --- a/packages/backend/src/core/CustomEmojiService.ts +++ b/packages/backend/src/core/CustomEmojiService.ts @@ -134,11 +134,11 @@ export class CustomEmojiService implements OnApplicationShutdown { this.localEmojisCache.refresh(); - const updated = await this.emojiEntityService.packDetailed(emoji.id); + const packed = await this.emojiEntityService.packDetailed(emoji.id); if (emoji.name === data.name) { this.globalEventService.publishBroadcastStream('emojiUpdated', { - emojis: [updated], + emojis: [packed], }); } else { this.globalEventService.publishBroadcastStream('emojiDeleted', { @@ -146,11 +146,12 @@ export class CustomEmojiService implements OnApplicationShutdown { }); this.globalEventService.publishBroadcastStream('emojiAdded', { - emoji: updated, + emoji: packed, }); } if (moderator) { + const updated = await this.emojisRepository.findOneByOrFail({ id: id }); this.moderationLogService.log(moderator, 'updateCustomEmoji', { emojiId: emoji.id, before: emoji, |