From 9931ba02e2254442f77cb672b159a68f28e5f235 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Fri, 12 Jul 2019 11:10:34 +0100 Subject: [PATCH 1/2] Fix message being undefined --- lib/BridgedRoom.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/BridgedRoom.js b/lib/BridgedRoom.js index 97dba4b0..64657cbb 100644 --- a/lib/BridgedRoom.js +++ b/lib/BridgedRoom.js @@ -510,11 +510,10 @@ BridgedRoom.prototype._handleSlackMessage = async function(message, ghost) { } // emotes else if (subtype === "me_message") { - const message = { + return ghost.sendMessage(roomID, { msgtype: "m.emote", body: message.text - }; - return ghost.sendMessage(roomID, message, slackRoomID, eventTS); + }, slackRoomID, eventTS); } // edits else if (subtype === "message_changed") { From 4463767db13f6802eb1d8dc65f5a9bb92784dab1 Mon Sep 17 00:00:00 2001 From: Will Hunt Date: Fri, 12 Jul 2019 11:10:43 +0100 Subject: [PATCH 2/2] Stop logging bodies of messages --- lib/substitutions.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/substitutions.js b/lib/substitutions.js index d2fa515b..72bc1401 100644 --- a/lib/substitutions.js +++ b/lib/substitutions.js @@ -39,8 +39,6 @@ function onMissingEmoji(name) { * @param {Object} file options slack file object */ var slackToMatrix = function(body, file) { - log.info("running substitutions on: " + body); - if (undefined != body) { for (var i = 0; i < SUBSTITUTION_PAIRS.length; ++i) { var pair = SUBSTITUTION_PAIRS[i];