From 704097cff73a91da6c239ad4c87f385e340b8803 Mon Sep 17 00:00:00 2001 From: Lucas Pelegrino Date: Thu, 18 Sep 2025 11:50:18 -0300 Subject: [PATCH 1/3] chore: adds a deprecation warning to livechat:saveDepartment method --- apps/meteor/app/livechat/server/methods/saveDepartment.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/meteor/app/livechat/server/methods/saveDepartment.ts b/apps/meteor/app/livechat/server/methods/saveDepartment.ts index 484cf275088d7..760be0950db29 100644 --- a/apps/meteor/app/livechat/server/methods/saveDepartment.ts +++ b/apps/meteor/app/livechat/server/methods/saveDepartment.ts @@ -3,6 +3,7 @@ import type { ServerMethods } from '@rocket.chat/ddp-client'; import { Meteor } from 'meteor/meteor'; import { hasPermissionAsync } from '../../../authorization/server/functions/hasPermission'; +import { methodDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; import { saveDepartment } from '../lib/departmentsLib'; declare module '@rocket.chat/ddp-client' { @@ -37,6 +38,7 @@ declare module '@rocket.chat/ddp-client' { Meteor.methods({ async 'livechat:saveDepartment'(_id, departmentData, departmentAgents, departmentUnit) { + methodDeprecationLogger.method('livechat:saveDeparment', '8.0.0', '/v1/livechat/department'); const uid = Meteor.userId(); if (!uid || !(await hasPermissionAsync(uid, 'manage-livechat-departments'))) { throw new Meteor.Error('error-not-allowed', 'Not allowed', { From 387ab8ba694223fe1107d41ddc8d04b1b346d9ac Mon Sep 17 00:00:00 2001 From: Lucas Pelegrino Date: Thu, 18 Sep 2025 11:53:35 -0300 Subject: [PATCH 2/3] docs: adds changeset --- .changeset/rare-plants-shake.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/rare-plants-shake.md diff --git a/.changeset/rare-plants-shake.md b/.changeset/rare-plants-shake.md new file mode 100644 index 0000000000000..74d80ba21a464 --- /dev/null +++ b/.changeset/rare-plants-shake.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Adds deprecation warning on `livechat:saveDepartment` From 6a6219fe15b822ffc20c7d8b5cd9dafe9f17d8be Mon Sep 17 00:00:00 2001 From: Lucas Pelegrino Date: Thu, 18 Sep 2025 11:54:55 -0300 Subject: [PATCH 3/3] fix: typo on livechat:saveDepartment --- apps/meteor/app/livechat/server/methods/saveDepartment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/meteor/app/livechat/server/methods/saveDepartment.ts b/apps/meteor/app/livechat/server/methods/saveDepartment.ts index 760be0950db29..6f6a7fc157fcd 100644 --- a/apps/meteor/app/livechat/server/methods/saveDepartment.ts +++ b/apps/meteor/app/livechat/server/methods/saveDepartment.ts @@ -38,7 +38,7 @@ declare module '@rocket.chat/ddp-client' { Meteor.methods({ async 'livechat:saveDepartment'(_id, departmentData, departmentAgents, departmentUnit) { - methodDeprecationLogger.method('livechat:saveDeparment', '8.0.0', '/v1/livechat/department'); + methodDeprecationLogger.method('livechat:saveDepartment', '8.0.0', '/v1/livechat/department'); const uid = Meteor.userId(); if (!uid || !(await hasPermissionAsync(uid, 'manage-livechat-departments'))) { throw new Meteor.Error('error-not-allowed', 'Not allowed', {