凍結されたユーザーが含まれている場合一部の機能が誤動作する不具合を修正 (MisskeyIO#161)
z-6561
This commit is contained in:
parent
58bbff3738
commit
545ab80363
5 changed files with 20 additions and 6 deletions
|
@ -64,4 +64,17 @@ export class NoteReactionEntityService implements OnModuleInit {
|
|||
} : {}),
|
||||
};
|
||||
}
|
||||
|
||||
@bindThis
|
||||
public async packMany(
|
||||
reactions: (MiNoteReaction['id'] | MiNoteReaction)[],
|
||||
me: { id: MiUser['id'] } | null | undefined,
|
||||
options?: {
|
||||
withNote: boolean;
|
||||
},
|
||||
) : Promise<Packed<'NoteReaction'>[]> {
|
||||
return (await Promise.allSettled(reactions.map(x => this.pack(x, me, options))))
|
||||
.filter(result => result.status === 'fulfilled')
|
||||
.map(result => (result as PromiseFulfilledResult<Packed<'NoteReaction'>>).value);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue