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` diff --git a/apps/meteor/app/livechat/server/methods/saveDepartment.ts b/apps/meteor/app/livechat/server/methods/saveDepartment.ts index 484cf275088d7..6f6a7fc157fcd 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: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', {