From c69423414d447f2d6e9427656c00508daf182660 Mon Sep 17 00:00:00 2001 From: AlexAlexandre Date: Fri, 4 Mar 2022 01:11:56 -0300 Subject: [PATCH] chore: add rest api return --- 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 6b4253966f5..f7c020fd8f1 100644 --- a/app/definitions/rest/v1/chat.ts +++ b/app/definitions/rest/v1/chat.ts @@ -14,6 +14,9 @@ export type ChatEndpoints = { 'chat.unfollowMessage': { POST: (params: { mid: 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 0e2a27d01cf..ba57c1d0044 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -273,10 +273,8 @@ export const togglePinMessage = (messageId: string, pinned: boolean): any => { 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) =>