summaryrefslogtreecommitdiff
path: root/packages/backend/src/core
diff options
context:
space:
mode:
authorおさむのひと <46447427+samunohito@users.noreply.github.com>2023-11-21 11:13:56 +0900
committerGitHub <noreply@github.com>2023-11-21 11:13:56 +0900
commit8bd9077f77eaebaa4dff403e072ba49e4cab1326 (patch)
tree91e217c04667b3d1d7a2abdb7f911c54cd1ae775 /packages/backend/src/core
parentupdate api.md (#12379) (diff)
downloadmisskey-8bd9077f77eaebaa4dff403e072ba49e4cab1326.tar.gz
misskey-8bd9077f77eaebaa4dff403e072ba49e4cab1326.tar.bz2
misskey-8bd9077f77eaebaa4dff403e072ba49e4cab1326.zip
json-schema配下の最新化 (#12312)
* user.ts、page.ts、drive-folder.tsを各EntityServiceの戻り値をもとに最新化 * 再確認 * fix error * note以外の残りのファイルを対応 * fix CHANGELOG.md * fix CHANGELOG.md * fix user.ts * fix user.ts * コメント対応 * fix note.ts --------- Co-authored-by: osamu <46447427+sam-osamu@users.noreply.github.com>
Diffstat (limited to 'packages/backend/src/core')
-rw-r--r--packages/backend/src/core/entities/NotificationEntityService.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/packages/backend/src/core/entities/NotificationEntityService.ts b/packages/backend/src/core/entities/NotificationEntityService.ts
index f74594ff0c..e723ea5a55 100644
--- a/packages/backend/src/core/entities/NotificationEntityService.ts
+++ b/packages/backend/src/core/entities/NotificationEntityService.ts
@@ -198,12 +198,14 @@ export class NotificationEntityService implements OnModuleInit {
});
} else if (notification.type === 'renote:grouped') {
const users = await Promise.all(notification.userIds.map(userId => {
- const user = hint?.packedUsers != null
- ? hint.packedUsers.get(userId)
- : this.userEntityService.pack(userId!, { id: meId }, {
- detail: false,
- });
- return user;
+ const packedUser = hint?.packedUsers != null ? hint.packedUsers.get(userId) : null;
+ if (packedUser) {
+ return packedUser;
+ }
+
+ return this.userEntityService.pack(userId, { id: meId }, {
+ detail: false,
+ });
}));
return await awaitAll({
id: notification.id,