From 7ee0b0060c183ad88182bdf24a57cab41b8d65e6 Mon Sep 17 00:00:00 2001 From: Kristina Date: Wed, 8 May 2024 19:26:42 +0400 Subject: [PATCH] Remove extra query params and apply (#5546) Signed-off-by: Kristina Fefelova --- plugins/activity-resources/src/components/Activity.svelte | 3 +-- plugins/chunter-resources/src/channelDataProvider.ts | 3 +-- plugins/chunter-resources/src/components/ChannelHeader.svelte | 1 - .../src/components/chat-message/ChatMessageInput.svelte | 2 +- server-plugins/chunter-resources/src/index.ts | 2 +- server-plugins/notification-resources/src/index.ts | 2 +- 6 files changed, 5 insertions(+), 8 deletions(-) diff --git a/plugins/activity-resources/src/components/Activity.svelte b/plugins/activity-resources/src/components/Activity.svelte index 53a28a07af..c608d32bb0 100644 --- a/plugins/activity-resources/src/components/Activity.svelte +++ b/plugins/activity-resources/src/components/Activity.svelte @@ -17,7 +17,6 @@ import { Doc, Ref, SortingOrder } from '@hcengineering/core' import { createQuery, getClient } from '@hcengineering/presentation' import { Component, Grid, Label, Lazy, Spinner } from '@hcengineering/ui' - import { onMount } from 'svelte' import ActivityExtensionComponent from './ActivityExtension.svelte' import ActivityFilter from './ActivityFilter.svelte' @@ -49,7 +48,7 @@ const res = activityMessagesQuery.query( activity.class.ActivityMessage, - { attachedTo: objectId, hidden: { $ne: true } }, + { attachedTo: objectId }, (result: ActivityMessage[]) => { void combineActivityMessages(result, order).then((messages) => { activityMessages = messages diff --git a/plugins/chunter-resources/src/channelDataProvider.ts b/plugins/chunter-resources/src/channelDataProvider.ts index 20124ba5b4..7e8932493c 100644 --- a/plugins/chunter-resources/src/channelDataProvider.ts +++ b/plugins/chunter-resources/src/channelDataProvider.ts @@ -159,7 +159,7 @@ export class ChannelDataProvider implements IChannelDataProvider { this.metadataQuery.query( this.msgClass, - { attachedTo: this.chatId, hidden: { $ne: true } }, + { attachedTo: this.chatId }, (res) => { this.updatesDates(res) this.metadataStore.set(res) @@ -235,7 +235,6 @@ export class ChannelDataProvider implements IChannelDataProvider { this.msgClass, { attachedTo: this.chatId, - hidden: { $ne: true }, ...(this.tailStart !== undefined ? { createdOn: { $gte: this.tailStart } } : {}) }, async (res) => { diff --git a/plugins/chunter-resources/src/components/ChannelHeader.svelte b/plugins/chunter-resources/src/components/ChannelHeader.svelte index 3802f07f6c..07626d6dc2 100644 --- a/plugins/chunter-resources/src/components/ChannelHeader.svelte +++ b/plugins/chunter-resources/src/components/ChannelHeader.svelte @@ -19,7 +19,6 @@ import { Channel } from '@hcengineering/chunter' import { ActivityMessagesFilter } from '@hcengineering/activity' import contact from '@hcengineering/contact' - import { DocNotifyContext } from '@hcengineering/notification' import Header from './Header.svelte' import chunter from '../plugin' diff --git a/plugins/chunter-resources/src/components/chat-message/ChatMessageInput.svelte b/plugins/chunter-resources/src/components/chat-message/ChatMessageInput.svelte index bba0cb3bb3..8d54786f20 100644 --- a/plugins/chunter-resources/src/components/chat-message/ChatMessageInput.svelte +++ b/plugins/chunter-resources/src/components/chat-message/ChatMessageInput.svelte @@ -101,7 +101,7 @@ async function onMessage (event: CustomEvent) { loading = true - const doneOp = await getClient().measure(`chunter.create.${_class}`) + const doneOp = await getClient().measure(`chunter.create.${_class} ${object._class}`) try { draftController.remove() inputRef.removeDraft(false) diff --git a/server-plugins/chunter-resources/src/index.ts b/server-plugins/chunter-resources/src/index.ts index 316663913e..9028db8629 100644 --- a/server-plugins/chunter-resources/src/index.ts +++ b/server-plugins/chunter-resources/src/index.ts @@ -491,7 +491,7 @@ async function OnChannelMembersChanged (tx: TxUpdateDoc, control: Trigg lastViewedTimestamp: tx.modifiedOn }) - await control.apply([updateTx], true) + res.push(updateTx) } } diff --git a/server-plugins/notification-resources/src/index.ts b/server-plugins/notification-resources/src/index.ts index 09c03d6c58..ecf1a480fa 100644 --- a/server-plugins/notification-resources/src/index.ts +++ b/server-plugins/notification-resources/src/index.ts @@ -411,7 +411,7 @@ export async function pushInboxNotifications ( const updateTx = control.txFactory.createTxUpdateDoc(context._class, context.space, context._id, { lastUpdateTimestamp: modifiedOn }) - await control.apply([updateTx], true) + res.push(updateTx) } docNotifyContextId = context._id }