From ec7538abfd401de56ab4beef33822f93a2b879f5 Mon Sep 17 00:00:00 2001 From: Alex Junior Date: Mon, 7 Mar 2022 11:08:45 -0300 Subject: [PATCH] chore: add rest api return (#3850) --- 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 52d8b0598..98c25df9a 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 71a0e7830..4130dd7d7 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -518,10 +518,8 @@ export const removeUserFromRoom = ({ roomId, t, userId }: { roomId: string; t: R // RC 0.48.0 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) => {