From a9f074d20a006547189857e783ba129092f23409 Mon Sep 17 00:00:00 2001 From: Alex Junior Date: Sat, 5 Mar 2022 00:40:41 -0300 Subject: [PATCH] chore: add rest api return (#3826) --- app/definitions/rest/v1/chat.ts | 3 +++ app/lib/rocketchat/services/restApi.ts | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/definitions/rest/v1/chat.ts b/app/definitions/rest/v1/chat.ts index 4f876d62d..52d8b0598 100644 --- a/app/definitions/rest/v1/chat.ts +++ b/app/definitions/rest/v1/chat.ts @@ -26,6 +26,9 @@ export type ChatEndpoints = { 'chat.pinMessage': { POST: (params: { messageId: IMessage['_id'] }) => void; }; + 'chat.reportMessage': { + POST: (params: { messageId: IMessage['_id']; description: string }) => void; + }; 'chat.getDiscussions': { GET: (params: { roomId: IRoom['_id']; text?: string; offset: number; count: number }) => { messages: IMessage[]; diff --git a/app/lib/rocketchat/services/restApi.ts b/app/lib/rocketchat/services/restApi.ts index c2cc66e63..43aff8c62 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -257,10 +257,8 @@ export const togglePinMessage = (messageId: string, pinned: boolean) => { return sdk.post('chat.pinMessage', { messageId }); }; -export const reportMessage = (messageId: string): any => +export const reportMessage = (messageId: string) => // RC 0.64.0 - // TODO: missing definitions from server - // @ts-ignore sdk.post('chat.reportMessage', { messageId, description: 'Message reported by user' }); export const setUserPreferences = (userId: string, data: Partial) =>