diff --git a/.changeset/tender-readers-run.md b/.changeset/tender-readers-run.md new file mode 100644 index 000000000000..d8bcfaf3e1a6 --- /dev/null +++ b/.changeset/tender-readers-run.md @@ -0,0 +1,5 @@ +--- +'@rocket.chat/meteor': major +--- + +This adjustment removes deprecated `livechat:getCustomFields` method. Moving forward use the `livechat/custom-fields` endpoint. diff --git a/apps/meteor/app/livechat/server/index.ts b/apps/meteor/app/livechat/server/index.ts index 0405d6fb6609..38462ef56c84 100644 --- a/apps/meteor/app/livechat/server/index.ts +++ b/apps/meteor/app/livechat/server/index.ts @@ -20,7 +20,6 @@ import './hooks/afterSaveOmnichannelMessage'; import './methods/changeLivechatStatus'; import './methods/closeRoom'; import './methods/discardTranscript'; -import './methods/getCustomFields'; import './methods/getAgentData'; import './methods/getAgentOverviewData'; import './methods/getAnalyticsChartData'; diff --git a/apps/meteor/app/livechat/server/methods/getCustomFields.ts b/apps/meteor/app/livechat/server/methods/getCustomFields.ts deleted file mode 100644 index 36dca08f0859..000000000000 --- a/apps/meteor/app/livechat/server/methods/getCustomFields.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { ILivechatCustomField } from '@rocket.chat/core-typings'; -import type { ServerMethods } from '@rocket.chat/ddp-client'; -import { LivechatCustomField } from '@rocket.chat/models'; -import { Meteor } from 'meteor/meteor'; - -import { methodDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; - -declare module '@rocket.chat/ddp-client' { - // eslint-disable-next-line @typescript-eslint/naming-convention - interface ServerMethods { - 'livechat:getCustomFields'(): ILivechatCustomField[]; - } -} - -Meteor.methods({ - async 'livechat:getCustomFields'() { - methodDeprecationLogger.method('livechat:getCustomFields', '7.0.0'); - return LivechatCustomField.find().toArray(); - }, -});