From 5f147b4ad1214fbbbf115c55541a68039d146237 Mon Sep 17 00:00:00 2001 From: jsundahl Date: Tue, 20 Jul 2021 14:19:09 -0400 Subject: [PATCH] rocketchat: fix reactToMessages callback rocketchat is dumb and sends an array of one message since version 3.8.0. see https://github.com/RocketChat/Rocket.Chat/pull/20801 this is scheduled to be fixed in version 3.12.0 --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 2f35a70..ec339aa 100644 --- a/index.js +++ b/index.js @@ -81,7 +81,8 @@ function RocketChat(skyfall) { source: id }); - return driver.reactToMessages((error, message) => { + return driver.reactToMessages((error, messages) => { + message = messages[0] if (error) { skyfall.events.emit({ type: `rocketchat:${ name }:error`,