Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since Rocket.Chat 3.8.0 message handling has been broken by the
hubot-rocketchat
adapter, the example in the README as well as other adapters. Rather than returning a single message, the API now returns an array of messages which breaks the message handling functions in the SDK.This PR contains the commit from @benwick in PR #126 with an additional fix to the
reactToMessages
function to also support an array of messages. With both of these fixes the example code in the README works, in addition to thehubot-rocketchat
adapter. The PRs #121 and #126 still do not let the code from the README work as is, since it uses thereactToMessages
functionIt also contains the compiled code and a version bump in
package.json
. I was able to get tsc to compile after some version hunting. I skipped the unit tests as I was getting rate limited, they don't seem to pass in the newest version of Rocket.Chat as they stand. I can expand this change to address, but primarily trying to get a fix merged as this is impacting all of our bots.