Chore: Migrate REST API - deleteMessage to TS (#3802)

* Migrate REST API `chats.delete` to TypeScript
This commit is contained in:
Gerzon Z 2022-03-02 17:45:05 -04:00 committed by GitHub
parent e8a80d391b
commit 4ba7f16b71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -32,4 +32,11 @@ export type ChatEndpoints = {
total: number;
}>;
};
'chat.delete': {
POST: (params: { msgId: string; roomId: string }) => {
_id: string;
ts: string;
message: Pick<IMessage, '_id' | 'rid' | 'u'>;
};
};
};

View File

@ -243,10 +243,8 @@ export const joinRoom = (roomId: string, joinCode: string | null, type: 'c' | 'p
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
// TODO: missing definitions from server
// @ts-ignore
sdk.post('chat.delete', { msgId: messageId, roomId: rid });
export const markAsUnread = ({ messageId }: { messageId: string }) =>