Skip to content

Conversation

@levenleven
Copy link
Contributor

To allow passing message thread id if any in addition to message id.

Copilot AI review requested due to automatic review settings January 25, 2026 10:03
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for the thread_id parameter to the ChatOps controller by including it in the list of permitted parameters. This allows clients to pass a message thread identifier along with message identifiers, which is useful for chat systems that support threaded conversations.

Changes:

  • Added :thread_id to the permitted parameters list in setup_params! method
Comments suppressed due to low confidence (2)

lib/chatops/controller.rb:60

  • The thread_id parameter has been added to the permitted parameters list, but the test helper methods (chatop and chat in lib/chatops/controller/test_case_helpers.rb) don't support passing or handling thread_id. For consistency with how other optional parameters like message_id are handled, the test helpers should be updated to support thread_id. Specifically, the chatop method should extract and pass thread_id (similar to lines 21-24 and 26-32), and the chat method should accept and merge thread_id into jsonrpc_params (similar to how message_id is handled on lines 42 and 65).
      self.params = params.permit(:action, :chatop, :controller, :id, :mention_slug, :message_id, :method, :room_id, :user, :raw_command, :thread_id)

lib/chatops/controller.rb:60

  • The thread_id parameter has been added to the permitted parameters list, but it's not documented in the README.md file. For consistency with the existing documentation pattern, please add a mention of thread_id in the README.md where other optional parameters are documented. Specifically, line 98 of README.md documents message_id and mention_slug - thread_id should be documented there as well to help users understand its purpose and availability.
      self.params = params.permit(:action, :chatop, :controller, :id, :mention_slug, :message_id, :method, :room_id, :user, :raw_command, :thread_id)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@levenleven levenleven merged commit 1164271 into master Jan 25, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants