fix(channel): read reactions from the reactions endpoint - #16
Merged
Merged
Conversation
getReactions() bound Endpoint::CHANNEL_MESSAGES, which has one slot, with a channel, a message and an emoji. The message and the emoji were dropped, so the call went to channels/:id/messages and came back with the channel's last messages mapped into User objects — never the reactions, and never an error either. The test asserted only the return type. Nothing here checked which endpoint a method reached, which is how a method could bind the wrong constant and still pass; the harness now takes an optional url to assert against, filled in for this one and worth filling in elsewhere.
github-actions Bot
pushed a commit
that referenced
this pull request
Sep 2, 2026
## [1.3.3](v1.3.2...v1.3.3) (2026-09-02) ### Bug Fixes * **channel:** read reactions from the reactions endpoint ([#16](#16)) ([dabcac0](dabcac0))
|
🎉 This PR is included in version 1.3.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
getReactions()bound the wrong endpoint constant:The bound URL is
channels/:channel_id/messages. So the call fetched the channel's most recent messages and mapped them intoUserobjects. No error, no empty result — a plausible-looking list of users that has nothing to do with who reacted.Why the test did not catch it
HttpHelperTestCasemocksHttp::get()with no argument expectations and asserts only the return type. Nothing in the REST suite checks which endpoint a method actually called, so a method can bind any constant at all and still pass.The harness now captures the requested URL and asserts it when a case supplies one:
Opt-in, so this PR stays about the bug, but it is worth backfilling across the suite — this is the third method in this repo found to have never worked, and the first two were also invisible for want of an assertion someone assumed was there.
Found while porting a bot that reads back petition votes on start-up to catch up on what it missed while it was down.
🤖 Generated with Claude Code