mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-21 17:37:29 -07:00
[backend] Fix an edge case where notifications wouldn't load properly
This commit is contained in:
parent
8ecf361870
commit
8fa2bf5dca
1 changed files with 7 additions and 5 deletions
|
@ -163,11 +163,13 @@ export const NotificationRepository = db.getRepository(Notification).extend({
|
|||
userId: meId,
|
||||
noteId: In(targets),
|
||||
});
|
||||
const myRenotes = await Notes.createQueryBuilder('note')
|
||||
.select('note.renoteId')
|
||||
.where('note.userId = :meId', { meId })
|
||||
.andWhere('note.renoteId IN (:...targets)', { targets })
|
||||
.getMany();
|
||||
const myRenotes = targets.length > 0
|
||||
? await Notes.createQueryBuilder('note')
|
||||
.select('note.renoteId')
|
||||
.where('note.userId = :meId', { meId })
|
||||
.andWhere('note.renoteId IN (:...targets)', { targets })
|
||||
.getMany()
|
||||
: [];
|
||||
|
||||
for (const target of targets) {
|
||||
myReactionsMap.set(
|
||||
|
|
Loading…
Reference in a new issue