From bcdb4150777be068b114ad217c7b29e783191cb2 Mon Sep 17 00:00:00 2001 From: Abhinav Kumar Date: Thu, 10 Oct 2024 01:13:11 +0530 Subject: [PATCH] chore!: remove deprecated livechat:pageVisited method (#33427) --- .changeset/tricky-horses-swim.md | 5 +++++ apps/meteor/app/livechat/server/index.ts | 1 - .../livechat/server/methods/pageVisited.ts | 19 ------------------- 3 files changed, 5 insertions(+), 20 deletions(-) create mode 100644 .changeset/tricky-horses-swim.md delete mode 100644 apps/meteor/app/livechat/server/methods/pageVisited.ts diff --git a/.changeset/tricky-horses-swim.md b/.changeset/tricky-horses-swim.md new file mode 100644 index 000000000000..570e10a32480 --- /dev/null +++ b/.changeset/tricky-horses-swim.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': major +--- + +Removed deprecated method `livechat:pageVisited`. Moving forward, use the `livechat/page.visited` endpoint. diff --git a/apps/meteor/app/livechat/server/index.ts b/apps/meteor/app/livechat/server/index.ts index e9ba895cbb92..55b69c552f02 100644 --- a/apps/meteor/app/livechat/server/index.ts +++ b/apps/meteor/app/livechat/server/index.ts @@ -26,7 +26,6 @@ import './methods/getAnalyticsChartData'; import './methods/getAnalyticsOverviewData'; import './methods/getNextAgent'; import './methods/getRoutingConfig'; -import './methods/pageVisited'; import './methods/registerGuest'; import './methods/removeAgent'; import './methods/removeAllClosedRooms'; diff --git a/apps/meteor/app/livechat/server/methods/pageVisited.ts b/apps/meteor/app/livechat/server/methods/pageVisited.ts deleted file mode 100644 index 7c0864f27b74..000000000000 --- a/apps/meteor/app/livechat/server/methods/pageVisited.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { ServerMethods } from '@rocket.chat/ddp-client'; -import { Meteor } from 'meteor/meteor'; - -import { methodDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; -import { Livechat } from '../lib/LivechatTyped'; - -declare module '@rocket.chat/ddp-client' { - // eslint-disable-next-line @typescript-eslint/naming-convention - interface ServerMethods { - 'livechat:pageVisited'(token: string, room: string, pageInfo: { title: string; location: { href: string }; change: string }): void; - } -} - -Meteor.methods({ - async 'livechat:pageVisited'(token, room, pageInfo) { - methodDeprecationLogger.method('livechat:pageVisited', '7.0.0'); - await Livechat.savePageHistory(token, room, pageInfo); - }, -});