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); - }, -});