RocketChat / Rocket.Chat.js.SDK

Utility for apps and bots to interact with Rocket.Chat via DDP and/or API
MIT License
136 stars 94 forks source link

Fix message handling in 3.8.0+ #127

Closed suranc closed 3 years ago

suranc commented 3 years ago

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 the hubot-rocketchat adapter. The PRs #121 and #126 still do not let the code from the README work as is, since it uses the reactToMessages function

It 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.

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

archiekennedy commented 3 years ago

Is this merge blocked by something?

Our ChatOps setup is completely broken. I'm willing to help out if there's anything I can do.

suranc commented 3 years ago

We have a large number of users broke by it too. It seems that the project is just slow to respond, I asked for an update on the issue #122