mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 01:47:39 -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,
|
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 a new issue