chore: add rest api return (#3826)
This commit is contained in:
parent
f69ef6e59b
commit
a9f074d20a
|
@ -26,6 +26,9 @@ export type ChatEndpoints = {
|
||||||
'chat.pinMessage': {
|
'chat.pinMessage': {
|
||||||
POST: (params: { messageId: IMessage['_id'] }) => void;
|
POST: (params: { messageId: IMessage['_id'] }) => void;
|
||||||
};
|
};
|
||||||
|
'chat.reportMessage': {
|
||||||
|
POST: (params: { messageId: IMessage['_id']; description: string }) => void;
|
||||||
|
};
|
||||||
'chat.getDiscussions': {
|
'chat.getDiscussions': {
|
||||||
GET: (params: { roomId: IRoom['_id']; text?: string; offset: number; count: number }) => {
|
GET: (params: { roomId: IRoom['_id']; text?: string; offset: number; count: number }) => {
|
||||||
messages: IMessage[];
|
messages: IMessage[];
|
||||||
|
|
|
@ -257,10 +257,8 @@ export const togglePinMessage = (messageId: string, pinned: boolean) => {
|
||||||
return sdk.post('chat.pinMessage', { messageId });
|
return sdk.post('chat.pinMessage', { messageId });
|
||||||
};
|
};
|
||||||
|
|
||||||
export const reportMessage = (messageId: string): any =>
|
export const reportMessage = (messageId: string) =>
|
||||||
// RC 0.64.0
|
// RC 0.64.0
|
||||||
// TODO: missing definitions from server
|
|
||||||
// @ts-ignore
|
|
||||||
sdk.post('chat.reportMessage', { messageId, description: 'Message reported by user' });
|
sdk.post('chat.reportMessage', { messageId, description: 'Message reported by user' });
|
||||||
|
|
||||||
export const setUserPreferences = (userId: string, data: Partial<INotificationPreferences>) =>
|
export const setUserPreferences = (userId: string, data: Partial<INotificationPreferences>) =>
|
||||||
|
|
Loading…
Reference in New Issue