Get rid of 'ne' in inbox queries (#6258)

Signed-off-by: Kristina Fefelova <kristin.fefelova@gmail.com>
This commit is contained in:
Kristina
2024-08-05 22:16:25 +07:00
committed by GitHub
parent c1508305bc
commit 32f0a7d9b2
9 changed files with 39 additions and 15 deletions
@@ -34,6 +34,7 @@ import notification, {
} from '@hcengineering/notification'
import { createQuery, getClient } from '@hcengineering/presentation'
import { derived, get, writable } from 'svelte/store'
import { isActivityNotification } from './utils'
/**
@@ -101,10 +102,9 @@ export class InboxNotificationsClientImpl implements InboxNotificationsClient {
}
)
this.otherInboxNotificationsQuery.query(
notification.class.InboxNotification,
notification.class.CommonInboxNotification,
{
_class: { $ne: notification.class.ActivityInboxNotification },
archived: { $ne: true },
archived: false,
user: getCurrentAccount()._id
},
(result: InboxNotification[]) => {
@@ -120,7 +120,7 @@ export class InboxNotificationsClientImpl implements InboxNotificationsClient {
this.activityInboxNotificationsQuery.query(
notification.class.ActivityInboxNotification,
{
archived: { $ne: true },
archived: false,
user: getCurrentAccount()._id
},
(result: ActivityInboxNotification[]) => {
@@ -242,7 +242,7 @@ export class InboxNotificationsClientImpl implements InboxNotificationsClient {
notification.class.InboxNotification,
{
user: getCurrentAccount()._id,
archived: { $ne: true }
archived: false
},
{ projection: { _id: 1, _class: 1, space: 1 } }
)
@@ -267,8 +267,8 @@ export class InboxNotificationsClientImpl implements InboxNotificationsClient {
notification.class.InboxNotification,
{
user: getCurrentAccount()._id,
isViewed: { $ne: true },
archived: { $ne: true }
isViewed: false,
archived: false
},
{ projection: { _id: 1, _class: 1, space: 1 } }
)
@@ -293,7 +293,7 @@ export class InboxNotificationsClientImpl implements InboxNotificationsClient {
{
user: getCurrentAccount()._id,
isViewed: true,
archived: { $ne: true }
archived: false
},
{
projection: { _id: 1, _class: 1, space: 1, docNotifyContext: 1 },