diff --git a/app/definitions/rest/v1/chat.ts b/app/definitions/rest/v1/chat.ts index 6b4253966..cd99ad6b3 100644 --- a/app/definitions/rest/v1/chat.ts +++ b/app/definitions/rest/v1/chat.ts @@ -11,6 +11,12 @@ export type ChatEndpoints = { 'chat.followMessage': { POST: (params: { mid: IMessage['_id'] }) => void; }; + 'chat.unStarMessage': { + POST: (params: { messageId: IMessage['_id'] }) => void; + }; + 'chat.starMessage': { + POST: (params: { messageId: IMessage['_id'] }) => void; + }; 'chat.unfollowMessage': { POST: (params: { mid: IMessage['_id'] }) => void; }; diff --git a/app/lib/rocketchat/services/restApi.ts b/app/lib/rocketchat/services/restApi.ts index 5ebe74977..e2ed1deaf 100644 --- a/app/lib/rocketchat/services/restApi.ts +++ b/app/lib/rocketchat/services/restApi.ts @@ -239,16 +239,12 @@ export const markAsUnread = ({ messageId }: { messageId: string }) => // RC 0.65.0 sdk.post('subscriptions.unread', { firstUnreadMessage: { _id: messageId } }); -export const toggleStarMessage = (messageId: string, starred: boolean): any => { +export const toggleStarMessage = (messageId: string, starred: boolean) => { if (starred) { // RC 0.59.0 - // TODO: missing definitions from server - // @ts-ignore return sdk.post('chat.unStarMessage', { messageId }); } // RC 0.59.0 - // TODO: missing definitions from server - // @ts-ignore return sdk.post('chat.starMessage', { messageId }); };