Skip to content

Commit

Permalink
chore!: remove deprecated method livechat:sendOfflineMessage (#33452)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavkrin committed Oct 10, 2024
1 parent d0b62c1 commit ff8a221
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 42 deletions.
5 changes: 5 additions & 0 deletions .changeset/unlucky-ducks-arrive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': major
---

Removes deprecated method `livechat:sendOfflineMessage`. Moving forward, use the endpoint `livechat/offline.message`.
5 changes: 4 additions & 1 deletion apps/meteor/app/livechat/server/api/v1/offlineMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import { Livechat } from '../../lib/LivechatTyped';

API.v1.addRoute(
'livechat/offline.message',
{ validateParams: isPOSTLivechatOfflineMessageParams },
{
validateParams: isPOSTLivechatOfflineMessageParams,
rateLimiterOptions: { numRequestsAllowed: 1, intervalTimeInMS: 5000 },
},
{
async post() {
const { name, email, message, department, host } = this.bodyParams;
Expand Down
1 change: 0 additions & 1 deletion apps/meteor/app/livechat/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import './methods/saveIntegration';
import './methods/saveTrigger';
import './methods/sendMessageLivechat';
import './methods/sendFileLivechatMessage';
import './methods/sendOfflineMessage';
import './methods/setCustomField';
import './methods/setDepartmentForVisitor';
import './methods/transfer';
Expand Down
40 changes: 0 additions & 40 deletions apps/meteor/app/livechat/server/methods/sendOfflineMessage.ts

This file was deleted.

0 comments on commit ff8a221

Please sign in to comment.