mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-28 08:26:44 -06:00
fix(backend) api/iの未読のお知らせにcreatedAtを追加するように修正 (#12092)
Co-authored-by: sorairo <sorairo@shiosyakeyakini.info>
This commit is contained in:
parent
3e5c55c14e
commit
6d6ddbc35e
1 changed files with 5 additions and 1 deletions
|
@ -322,7 +322,11 @@ export class UserEntityService implements OnModuleInit {
|
|||
|
||||
const isModerator = isMe && opts.detail ? this.roleService.isModerator(user) : null;
|
||||
const isAdmin = isMe && opts.detail ? this.roleService.isAdministrator(user) : null;
|
||||
const unreadAnnouncements = isMe && opts.detail ? await this.announcementService.getUnreadAnnouncements(user) : null;
|
||||
const unreadAnnouncements = isMe && opts.detail ?
|
||||
(await this.announcementService.getUnreadAnnouncements(user)).map((announcement) => ({
|
||||
createdAt: this.idService.parse(announcement.id).date.toISOString(),
|
||||
...announcement,
|
||||
})) : null;
|
||||
|
||||
const falsy = opts.detail ? false : undefined;
|
||||
|
||||
|
|
Loading…
Reference in a new issue