mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-09-11 21:47:09 +03:00
Don't mark as ready already read notifications
This commit is contained in:
parent
fdfc10d13c
commit
9ee1f7b57c
@ -290,7 +290,8 @@ export class UserNotificationModel extends SequelizeModel<UserNotificationModel>
|
|||||||
userId,
|
userId,
|
||||||
id: {
|
id: {
|
||||||
[Op.in]: notificationIds
|
[Op.in]: notificationIds
|
||||||
}
|
},
|
||||||
|
read: false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -298,7 +299,7 @@ export class UserNotificationModel extends SequelizeModel<UserNotificationModel>
|
|||||||
}
|
}
|
||||||
|
|
||||||
static markAllAsRead (userId: number) {
|
static markAllAsRead (userId: number) {
|
||||||
const query = { where: { userId } }
|
const query = { where: { userId, read: false } }
|
||||||
|
|
||||||
return UserNotificationModel.update({ read: true }, query)
|
return UserNotificationModel.update({ read: true }, query)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user