diff --git a/app/definitions/rest/v1/chat.ts b/app/definitions/rest/v1/chat.ts index 4f876d62..52d8b059 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 c2cc66e6..43aff8c6 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) =>