diff --git a/app/definitions/rest/v1/chat.ts b/app/definitions/rest/v1/chat.ts index cd99ad6b3..06f5f733d 100644 --- a/app/definitions/rest/v1/chat.ts +++ b/app/definitions/rest/v1/chat.ts @@ -20,6 +20,12 @@ export type ChatEndpoints = { 'chat.unfollowMessage': { POST: (params: { mid: IMessage['_id'] }) => void; }; + 'chat.unPinMessage': { + POST: (params: { messageId: IMessage['_id'] }) => void; + }; + 'chat.pinMessage': { + POST: (params: { messageId: IMessage['_id'] }) => 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 e2ed1deaf..c8bc0cf3e 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -248,16 +248,12 @@ export const toggleStarMessage = (messageId: string, starred: boolean) => { return sdk.post('chat.starMessage', { messageId }); }; -export const togglePinMessage = (messageId: string, pinned: boolean): any => { +export const togglePinMessage = (messageId: string, pinned: boolean) => { if (pinned) { // RC 0.59.0 - // TODO: missing definitions from server - // @ts-ignore return sdk.post('chat.unPinMessage', { messageId }); } // RC 0.59.0 - // TODO: missing definitions from server - // @ts-ignore return sdk.post('chat.pinMessage', { messageId }); };