chore: add rest api return (#3826)

This commit is contained in:
Alex Junior 2022-03-05 00:40:41 -03:00 committed by GitHub
parent f69ef6e59b
commit a9f074d20a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -26,6 +26,9 @@ export type ChatEndpoints = {
'chat.pinMessage': {
POST: (params: { messageId: IMessage['_id'] }) => void;
};
'chat.reportMessage': {
POST: (params: { messageId: IMessage['_id']; description: string }) => void;
};
'chat.getDiscussions': {
GET: (params: { roomId: IRoom['_id']; text?: string; offset: number; count: number }) => {
messages: IMessage[];

View File

@ -257,10 +257,8 @@ export const togglePinMessage = (messageId: string, pinned: boolean) => {
return sdk.post('chat.pinMessage', { messageId });
};
export const reportMessage = (messageId: string): any =>
export const reportMessage = (messageId: string) =>
// RC 0.64.0
// TODO: missing definitions from server
// @ts-ignore
sdk.post('chat.reportMessage', { messageId, description: 'Message reported by user' });
export const setUserPreferences = (userId: string, data: Partial<INotificationPreferences>) =>