Skip to content

Commit 6e1ffc0

Browse files
lucas-a-pelegrinoggazzo
authored andcommitted
chore!: removes deprecated method livechat:saveBusinessHour (#37772)
1 parent 5f209ec commit 6e1ffc0

File tree

3 files changed

+5
-25
lines changed

3 files changed

+5
-25
lines changed

.changeset/twelve-years-act.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rocket.chat/meteor": patch
3+
---
4+
5+
Removes deprecated method `livechat:saveBusinessHour`

apps/meteor/app/livechat/server/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,3 @@ import './lib/stream/agentStatus';
2525
import './sendMessageBySMS';
2626
import './api';
2727
import './api/rest';
28-
import './methods/saveBusinessHour';
Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +0,0 @@
1-
import type { ILivechatBusinessHour } from '@rocket.chat/core-typings';
2-
import type { ServerMethods } from '@rocket.chat/ddp-client';
3-
import { Meteor } from 'meteor/meteor';
4-
5-
import { methodDeprecationLogger } from '../../../lib/server/lib/deprecationWarningLogger';
6-
import { businessHourManager } from '../business-hour';
7-
8-
declare module '@rocket.chat/ddp-client' {
9-
// eslint-disable-next-line @typescript-eslint/naming-convention
10-
interface ServerMethods {
11-
'livechat:saveBusinessHour'(businessHourData: ILivechatBusinessHour): void;
12-
}
13-
}
14-
15-
Meteor.methods<ServerMethods>({
16-
async 'livechat:saveBusinessHour'(businessHourData) {
17-
methodDeprecationLogger.method('livechat:saveBusinessHour', '8.0.0', '/v1/livechat/business-hours.save');
18-
try {
19-
await businessHourManager.saveBusinessHour(businessHourData);
20-
} catch (e) {
21-
throw new Meteor.Error(e instanceof Error ? e.message : String(e));
22-
}
23-
},
24-
});

0 commit comments

Comments
 (0)