From dac6563d6d6fd429efe6258872c791912188f077 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Fri, 7 Feb 2020 11:10:15 +0100 Subject: [PATCH] #2019 Deprecated method chat.sendMessage() --- back/methods/chat/sendMessage.js | 30 ------------------------------ back/models/chat.js | 1 - 2 files changed, 31 deletions(-) delete mode 100644 back/methods/chat/sendMessage.js diff --git a/back/methods/chat/sendMessage.js b/back/methods/chat/sendMessage.js deleted file mode 100644 index b6eaf79a8..000000000 --- a/back/methods/chat/sendMessage.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = Self => { - Self.remoteMethodCtx('sendMessage', { - description: 'Send a RocketChat message', - accessType: 'WRITE', - accepts: [{ - arg: 'to', - type: 'String', - required: true, - description: 'user (@) or channel (#) to send the message' - }, { - arg: 'message', - type: 'String', - required: true, - description: 'The message' - }], - returns: { - type: 'Object', - root: true - }, - http: { - path: `/sendMessage`, - verb: 'POST' - } - }); - - // FIXME: Deprecate this method #2019 - Self.sendMessage = async(ctx, to, message) => { - return Self.send(ctx, to, message); - }; -}; diff --git a/back/models/chat.js b/back/models/chat.js index ecd47029c..ab23ef713 100644 --- a/back/models/chat.js +++ b/back/models/chat.js @@ -1,5 +1,4 @@ module.exports = Self => { require('../methods/chat/send')(Self); - require('../methods/chat/sendMessage')(Self); require('../methods/chat/sendCheckingPresence')(Self); };