Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions app/definitions/rest/v1/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,12 @@ export type ChatEndpoints = {
total: number;
}>;
};
'chat.delete': {
POST: (params: { msgId: string; roomId: string }) => {
_id: string;
ts: Date;
Comment thread
gerzonc marked this conversation as resolved.
Outdated
message: Pick<IMessage, '_id' | 'rid' | 'u'>;
success: boolean;
Comment thread
gerzonc marked this conversation as resolved.
Outdated
};
};
};
4 changes: 1 addition & 3 deletions app/lib/rocketchat/services/restApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,8 @@ export const joinRoom = (roomId: string, joinCode: string, type: 'c' | 'p'): any
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 }): any =>
Expand Down