diff --git a/.changeset/chilled-chicken-drop.md b/.changeset/chilled-chicken-drop.md new file mode 100644 index 0000000000000..139b3c00c82dd --- /dev/null +++ b/.changeset/chilled-chicken-drop.md @@ -0,0 +1,6 @@ +--- +"@rocket.chat/meteor": patch +"@rocket.chat/ddp-streamer": patch +--- + +Adds deprecation warning on `livechat:setupConnection` diff --git a/apps/meteor/app/livechat/server/methods/setUpConnection.ts b/apps/meteor/app/livechat/server/methods/setUpConnection.ts index d6f05c9af03f1..4aea4caa7c6fd 100644 --- a/apps/meteor/app/livechat/server/methods/setUpConnection.ts +++ b/apps/meteor/app/livechat/server/methods/setUpConnection.ts @@ -3,6 +3,7 @@ import type { ServerMethods } from '@rocket.chat/ddp-client'; import { check } from 'meteor/check'; import { Meteor } from 'meteor/meteor'; +import { methodDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; import { notifyGuestStatusChanged } from '../lib/guests'; declare module '@rocket.chat/ddp-client' { @@ -24,6 +25,7 @@ declare module 'meteor/meteor' { Meteor.methods({ 'livechat:setUpConnection'(data) { + methodDeprecationLogger.method('livechat:setUpConnection', '8.0.0', 'This functionality is no longer supported'); check(data, { token: String, }); diff --git a/ee/apps/ddp-streamer/src/configureServer.ts b/ee/apps/ddp-streamer/src/configureServer.ts index ed187db498cc3..bf9bd15627cfa 100644 --- a/ee/apps/ddp-streamer/src/configureServer.ts +++ b/ee/apps/ddp-streamer/src/configureServer.ts @@ -139,6 +139,7 @@ server.methods({ }, // Copied from /app/livechat/server/methods/setUpConnection.js 'livechat:setUpConnection'(data = {}) { + console.warn('Warning: Method livechat:setUpConnection is deprecated and will be removed on v8.0.0'); const { token } = data; if (typeof token !== 'string') {