diff --git a/.changeset/clever-guests-invent.md b/.changeset/clever-guests-invent.md deleted file mode 100644 index 317ea3eb3d4..00000000000 --- a/.changeset/clever-guests-invent.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@rocket.chat/meteor": patch ---- - -Avoid streaming inquiries to client when routing algorithm is not manual selection. Previously, all inquiries where sent to the client no matter which routing was used. Inquiries are not shown on the UI or interacted with when the inquiry is not manual selection. -Moreover, when the algorithm changes from Auto to Manual, the UI gets the updated list of inquiries from the server, cleaning the ones received up to that point. - -Change will reduce the data sent over the wire and stored on the client's db. diff --git a/apps/meteor/server/modules/listeners/listeners.module.ts b/apps/meteor/server/modules/listeners/listeners.module.ts index 5b1e1259f13..ecaab84b2fa 100644 --- a/apps/meteor/server/modules/listeners/listeners.module.ts +++ b/apps/meteor/server/modules/listeners/listeners.module.ts @@ -209,12 +209,6 @@ export class ListenersModule { }); service.onEvent('watch.inquiries', async ({ clientAction, inquiry, diff }): Promise => { - // We do not need inquiries on the client when the routing method is not manual - // When the routing method changes, client fetches inquiries again and discards the received ones - if (settings.get('Livechat_Routing_Method') !== 'Manual_Selection') { - return; - } - const type = minimongoChangeMap[clientAction] as 'added' | 'changed' | 'removed'; if (clientAction === 'removed') { notifications.streamLivechatQueueData.emitWithoutBroadcast(inquiry._id, {