chore: add rest api return (#3825)
This commit is contained in:
parent
4989e6cb5c
commit
70c15343e8
|
@ -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[];
|
||||
|
|
|
@ -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 });
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue