Skip to content

Commit a62792a

Browse files
chore: adds deprecation warning on livechat:setupConnection (RocketChat#37218)
1 parent f8150c1 commit a62792a

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

.changeset/chilled-chicken-drop.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@rocket.chat/meteor": patch
3+
"@rocket.chat/ddp-streamer": patch
4+
---
5+
6+
Adds deprecation warning on `livechat:setupConnection`

apps/meteor/app/livechat/server/methods/setUpConnection.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { ServerMethods } from '@rocket.chat/ddp-client';
33
import { check } from 'meteor/check';
44
import { Meteor } from 'meteor/meteor';
55

6+
import { methodDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger';
67
import { notifyGuestStatusChanged } from '../lib/guests';
78

89
declare module '@rocket.chat/ddp-client' {
@@ -24,6 +25,7 @@ declare module 'meteor/meteor' {
2425

2526
Meteor.methods<ServerMethods>({
2627
'livechat:setUpConnection'(data) {
28+
methodDeprecationLogger.method('livechat:setUpConnection', '8.0.0', 'This functionality is no longer supported');
2729
check(data, {
2830
token: String,
2931
});

ee/apps/ddp-streamer/src/configureServer.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ server.methods({
139139
},
140140
// Copied from /app/livechat/server/methods/setUpConnection.js
141141
'livechat:setUpConnection'(data = {}) {
142+
console.warn('Warning: Method livechat:setUpConnection is deprecated and will be removed on v8.0.0');
142143
const { token } = data;
143144

144145
if (typeof token !== 'string') {

0 commit comments

Comments
 (0)