diff --git a/app/definitions/rest/v1/channels.ts b/app/definitions/rest/v1/channels.ts index 6692f0a9c..acdd87e26 100644 --- a/app/definitions/rest/v1/channels.ts +++ b/app/definitions/rest/v1/channels.ts @@ -52,4 +52,7 @@ export type ChannelsEndpoints = { 'channels.convertToTeam': { POST: (params: { channelId: string; channelName: string }) => { team: ITeam }; }; + 'channels.leave': { + POST: (params: { roomId: string }) => {}; + }; }; diff --git a/app/definitions/rest/v1/groups.ts b/app/definitions/rest/v1/groups.ts index 966a6759a..8d77cb3a8 100644 --- a/app/definitions/rest/v1/groups.ts +++ b/app/definitions/rest/v1/groups.ts @@ -46,4 +46,7 @@ export type GroupsEndpoints = { 'groups.convertToTeam': { POST: (params: { roomId: string; roomName: string }) => { team: ITeam }; }; + 'groups.leave': { + POST: (params: { roomId: string }) => {}; + }; }; diff --git a/app/definitions/rest/v1/im.ts b/app/definitions/rest/v1/im.ts index b2927b03c..5bdc274e3 100644 --- a/app/definitions/rest/v1/im.ts +++ b/app/definitions/rest/v1/im.ts @@ -38,4 +38,7 @@ export type ImEndpoints = { messages: IMessageFromServer[]; }; }; + 'im.leave': { + POST: (params: { roomId: string }) => {}; + }; }; diff --git a/app/lib/rocketchat/services/restApi.ts b/app/lib/rocketchat/services/restApi.ts index 8f0d074d4..96331c20a 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -428,10 +428,8 @@ export const toggleBlockUser = (rid: string, blocked: string, block: boolean): P return sdk.methodCallWrapper('unblockUser', { rid, blocked }); }; -export const leaveRoom = (roomId: string, t: RoomTypes): any => +export const leaveRoom = (roomId: string, t: RoomTypes) => // RC 0.48.0 - // TODO: missing definitions from server - // @ts-ignore sdk.post(`${roomTypeToApiType(t)}.leave`, { roomId }); export const deleteRoom = (roomId: string, t: RoomTypes): any =>