Chore: Migrate REST API - deleteMessage to TS (#3802)
* Migrate REST API `chats.delete` to TypeScript
This commit is contained in:
parent
e8a80d391b
commit
4ba7f16b71
|
@ -32,4 +32,11 @@ export type ChatEndpoints = {
|
||||||
total: number;
|
total: number;
|
||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
|
'chat.delete': {
|
||||||
|
POST: (params: { msgId: string; roomId: string }) => {
|
||||||
|
_id: string;
|
||||||
|
ts: string;
|
||||||
|
message: Pick<IMessage, '_id' | 'rid' | 'u'>;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -243,10 +243,8 @@ export const joinRoom = (roomId: string, joinCode: string | null, type: 'c' | 'p
|
||||||
return sdk.post('channels.join', { roomId, joinCode });
|
return sdk.post('channels.join', { roomId, joinCode });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const deleteMessage = (messageId: string, rid: string): any =>
|
export const deleteMessage = (messageId: string, rid: string) =>
|
||||||
// RC 0.48.0
|
// RC 0.48.0
|
||||||
// TODO: missing definitions from server
|
|
||||||
// @ts-ignore
|
|
||||||
sdk.post('chat.delete', { msgId: messageId, roomId: rid });
|
sdk.post('chat.delete', { msgId: messageId, roomId: rid });
|
||||||
|
|
||||||
export const markAsUnread = ({ messageId }: { messageId: string }) =>
|
export const markAsUnread = ({ messageId }: { messageId: string }) =>
|
||||||
|
|
Loading…
Reference in New Issue