From a7f7de425f232847da4febacd743af21e0426600 Mon Sep 17 00:00:00 2001 From: AlexAlexandre Date: Sun, 6 Mar 2022 13:01:40 -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 52d8b059830..98c25df9a48 100644 --- a/app/definitions/rest/v1/chat.ts +++ b/app/definitions/rest/v1/chat.ts @@ -57,4 +57,7 @@ export type ChatEndpoints = { 'chat.react': { POST: (params: { emoji: string; messageId: string }) => void; }; + 'chat.ignoreUser': { + GET: (params: { rid: string; userId: string; ignore: boolean }) => {}; + }; }; diff --git a/app/lib/rocketchat/services/restApi.ts b/app/lib/rocketchat/services/restApi.ts index 43aff8c623d..fd3cf831ff1 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -528,10 +528,8 @@ export const removeUserFromRoom = ({ roomId, t, userId }: { roomId: string; t: S // @ts-ignore sdk.post(`${roomTypeToApiType(t)}.kick`, { roomId, userId }); -export const ignoreUser = ({ rid, userId, ignore }: { rid: string; userId: string; ignore: boolean }): any => +export const ignoreUser = ({ rid, userId, ignore }: { rid: string; userId: string; ignore: boolean }) => // RC 0.64.0 - // TODO: missing definitions from server - // @ts-ignore sdk.get('chat.ignoreUser', { rid, userId, ignore }); export const toggleArchiveRoom = (roomId: string, t: SubscriptionType, archive: boolean) => {