feat: POST /chats/:roomId/:mid and DELETE /chats/:roomId/:mid

This commit is contained in:
Julian Lam
2021-12-20 15:00:43 -05:00
parent 90fcbe4416
commit d5fd098ecf
7 changed files with 178 additions and 20 deletions

View File

@@ -156,6 +156,8 @@ SocketModules.chats.edit = async function (socket, data) {
};
SocketModules.chats.delete = async function (socket, data) {
sockets.warnDeprecated(socket, 'DELETE /api/v3/chats/:roomId/:mid');
if (!data || !data.roomId || !data.messageId) {
throw new Error('[[error:invalid-data]]');
}
@@ -164,6 +166,8 @@ SocketModules.chats.delete = async function (socket, data) {
};
SocketModules.chats.restore = async function (socket, data) {
sockets.warnDeprecated(socket, 'POST /api/v3/chats/:roomId/:mid');
if (!data || !data.roomId || !data.messageId) {
throw new Error('[[error:invalid-data]]');
}