diff --git a/.changeset/twelve-years-act.md b/.changeset/twelve-years-act.md new file mode 100644 index 0000000000000..d118252c3fffe --- /dev/null +++ b/.changeset/twelve-years-act.md @@ -0,0 +1,5 @@ +--- +"@rocket.chat/meteor": patch +--- + +Removes deprecated method `livechat:saveBusinessHour` diff --git a/apps/meteor/app/livechat/server/index.ts b/apps/meteor/app/livechat/server/index.ts index bdc8ab8557ece..6b1e5b1636746 100644 --- a/apps/meteor/app/livechat/server/index.ts +++ b/apps/meteor/app/livechat/server/index.ts @@ -25,4 +25,3 @@ import './lib/stream/agentStatus'; import './sendMessageBySMS'; import './api'; import './api/rest'; -import './methods/saveBusinessHour'; diff --git a/apps/meteor/app/livechat/server/methods/saveBusinessHour.ts b/apps/meteor/app/livechat/server/methods/saveBusinessHour.ts index 43534f86a7b18..e69de29bb2d1d 100644 --- a/apps/meteor/app/livechat/server/methods/saveBusinessHour.ts +++ b/apps/meteor/app/livechat/server/methods/saveBusinessHour.ts @@ -1,24 +0,0 @@ -import type { ILivechatBusinessHour } from '@rocket.chat/core-typings'; -import type { ServerMethods } from '@rocket.chat/ddp-client'; -import { Meteor } from 'meteor/meteor'; - -import { methodDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger'; -import { businessHourManager } from '../business-hour'; - -declare module '@rocket.chat/ddp-client' { - // eslint-disable-next-line @typescript-eslint/naming-convention - interface ServerMethods { - 'livechat:saveBusinessHour'(businessHourData: ILivechatBusinessHour): void; - } -} - -Meteor.methods({ - async 'livechat:saveBusinessHour'(businessHourData) { - methodDeprecationLogger.method('livechat:saveBusinessHour', '8.0.0', '/v1/livechat/business-hours.save'); - try { - await businessHourManager.saveBusinessHour(businessHourData); - } catch (e) { - throw new Meteor.Error(e instanceof Error ? e.message : String(e)); - } - }, -});