mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 04:03:49 +01:00
[backend] Fix an edge case where notifications wouldn't load properly
This commit is contained in:
parent
8ecf361870
commit
8fa2bf5dca
@ -163,11 +163,13 @@ export const NotificationRepository = db.getRepository(Notification).extend({
|
|||||||
userId: meId,
|
userId: meId,
|
||||||
noteId: In(targets),
|
noteId: In(targets),
|
||||||
});
|
});
|
||||||
const myRenotes = await Notes.createQueryBuilder('note')
|
const myRenotes = targets.length > 0
|
||||||
.select('note.renoteId')
|
? await Notes.createQueryBuilder('note')
|
||||||
.where('note.userId = :meId', { meId })
|
.select('note.renoteId')
|
||||||
.andWhere('note.renoteId IN (:...targets)', { targets })
|
.where('note.userId = :meId', { meId })
|
||||||
.getMany();
|
.andWhere('note.renoteId IN (:...targets)', { targets })
|
||||||
|
.getMany()
|
||||||
|
: [];
|
||||||
|
|
||||||
for (const target of targets) {
|
for (const target of targets) {
|
||||||
myReactionsMap.set(
|
myReactionsMap.set(
|
||||||
|
Loading…
Reference in New Issue
Block a user