UBERF-6094: preparing bot (#5061)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2024-03-26 00:31:13 +07:00
committed by GitHub
parent ace5692b91
commit ada9a0bdde
18 changed files with 184 additions and 28 deletions
@@ -224,11 +224,9 @@ export class InboxNotificationsClientImpl implements InboxNotificationsClient {
return
}
const notificationsToRead = await client.findAll(notification.class.ActivityInboxNotification, {
user: getCurrentAccount()._id,
attachedTo: { $in: toReadIds },
isViewed: { $ne: true }
})
const notificationsToRead = get(this.activityInboxNotifications).filter(({ attachedTo }) =>
toReadIds.includes(attachedTo)
)
for (const notification of notificationsToRead) {
await client.update(notification, { isViewed: true })