Skip to content

Fix: Remove messageId arg from room reactions#12

Merged
splindsay-92 merged 3 commits into
mainfrom
fix/remove-messageId-from-room-reactions
May 12, 2025
Merged

Fix: Remove messageId arg from room reactions#12
splindsay-92 merged 3 commits into
mainfrom
fix/remove-messageId-from-room-reactions

Conversation

@splindsay-92

@splindsay-92 splindsay-92 commented May 8, 2025

Copy link
Copy Markdown
Contributor

Description

Room reactions do not require a messageId, so this has been removed.

Summary by CodeRabbit

  • Documentation

    • Updated documentation to reflect that sending a reaction in a chat room no longer requires specifying a message ID. Usage examples and descriptions now show reactions sent directly to a room with an emoji.
  • Refactor

    • Simplified the reaction sending command to remove the message ID argument, making reactions apply at the room level.
    • Cleaned up unused, commented-out code for better maintainability.

@coderabbitai

coderabbitai Bot commented May 8, 2025

Copy link
Copy Markdown

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The updates remove the requirement to specify a message ID when sending a reaction in a chat room, both in the command-line interface and its documentation. The command now sends reactions at the room level using only the room ID and emoji. Additionally, a commented-out interface was cleaned up from the subscription command.

Changes

File(s) Change Summary
README.md Updated documentation to remove the MESSAGEID argument from the reaction send command, revising descriptions and examples accordingly.
src/commands/rooms/reactions/send.ts Removed the messageId argument and all related logic; updated command description, usage, and output to reflect room-level reactions only.
src/commands/rooms/reactions/subscribe.ts Deleted a commented-out interface declaration (ChatClients); no functional code changes.

Poem

In the chat room, reactions now fly,
No message to target, just give it a try!
With emoji in hand, the command is now neat,
Simpler and cleaner, a bunny’s small feat.
Old code swept away, like fluff in the breeze,
Room-level reactions—delivered with ease!
🐇✨


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@splindsay-92 splindsay-92 requested a review from AndyTWF May 8, 2025 08:54

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
README.md (1)

3878-3883: Add language identifier to fenced code block
To improve readability and satisfy markdown lint rules (MD040), specify the language on the code fence for the usage example. For example:

- ```
+ ```sh
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)

3878-3878: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bf98103 and cb48b69.

📒 Files selected for processing (3)
  • README.md (3 hunks)
  • src/commands/rooms/reactions/send.ts (8 hunks)
  • src/commands/rooms/reactions/subscribe.ts (0 hunks)
💤 Files with no reviewable changes (1)
  • src/commands/rooms/reactions/subscribe.ts
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md

3878-3878: Fenced code blocks should have a language specified
null

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: test
  • GitHub Check: e2e-tests
🔇 Additional comments (15)
README.md (4)

3874-3876: Consistent heading update: Removed MESSAGEID
The heading now correctly reflects the new signature without the MESSAGEID parameter.


3880-3883: Usage updated to remove MESSAGEID
The usage example now only requires ROOMID and EMOJI, matching the updated command implementation.


3885-3887: Arguments section matches new signature
The ARGUMENTS section correctly lists only ROOMID and EMOJI, omitting MESSAGEID.


3903-3905: Description aligned with updated signature
The DESCRIPTION section accurately describes sending a reaction at the room level without targeting a message.

src/commands/rooms/reactions/send.ts (11)

8-18: Correctly removed the messageId parameter from command arguments

The command now properly defines only roomId and emoji as its arguments, which aligns with the PR objective to remove the unnecessary messageId parameter from room reactions.


20-20: Description updated to reflect room-level reaction

The command description has been appropriately updated to describe sending a reaction in a chat room without referencing a specific message.


22-27: Examples updated consistently

All command examples have been updated to reflect the new syntax without the messageId parameter, making the documentation clear and consistent.


64-64: Parameter destructuring updated appropriately

The destructuring of arguments now correctly includes only roomId and emoji, removing the previously unused messageId parameter.


87-88: Error output format updated

The JSON error output format has been correctly updated to remove the messageId field while maintaining all other necessary information.


204-205: Log message simplified appropriately

The log message for sending a reaction has been simplified to remove references to messageId while still providing clear information about the action being performed.


215-216: Success log message updated

The success log message has been simplified to remove the messageId reference while maintaining clarity about the completed action.


230-231: Console output message updated consistently

The user-facing success message has been updated to clearly indicate that the reaction was sent to the room, without referencing a specific message.


259-260: Error log message updated

The error log message has been properly updated to remove the messageId field while maintaining all relevant error context.


270-272: Error JSON output format updated

The error JSON output format has been correctly updated to remove the messageId field while maintaining all other necessary information.


207-210: Reaction send implementation remains unchanged

The actual implementation of sending a reaction didn't require changes, confirming that the messageId parameter was indeed unnecessary as the room.reactions.send method only needs emoji type and metadata.

@splindsay-92 splindsay-92 merged commit d068468 into main May 12, 2025
@coderabbitai coderabbitai Bot mentioned this pull request May 19, 2025
mattheworiordan pushed a commit that referenced this pull request Jun 12, 2025
…ions

Fix: Remove messageId arg from room reactions and fix some failing tests
@mattheworiordan mattheworiordan deleted the fix/remove-messageId-from-room-reactions branch June 12, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants