Skip to content

PR Actions button posts the slash command as a message instead of running it #158

Open

Description

@austin-rt

Description:

The "PR Actions in #" button that the app adds to messages with a GitHub pull request link posts /github <owner>/<repo> pulls <n> into the room as a normal message. The command never runs, and everyone in the room sees the raw text.

Steps to reproduce:

  1. Install the app and post a message containing a pull request link, for example [Feat]: Add new GithubSDK class #144
  2. Click the "PR Actions in Apps.Github22 [Feat]: Add new GithubSDK class #144" button under the message.

Expected behavior:

The PR view opens, the same as typing /github RocketChat/Apps.Github22 pulls 144.

Actual behavior:

/github RocketChat/Apps.Github22 pulls 144 is posted to the room as a message from the user who clicked, and nothing else happens.

Rocket.Chat Server Setup Information:

  • Version of Rocket.Chat Server: 8.8
  • Operating System: Linux
  • Deployment Method: docker

Rocket.Chat Client Setup Information

  • Browser Version: Chrome, web client

Additional context

The button is a message attachment action with msg_in_chat_window: true and no msg_processing_type (github/handlers/GithubPRlinkHandler.ts). Rocket.Chat's client sends that text through its send flow without allowing slash commands (isSlashCommandAllowed in apps/meteor/client/lib/chats/flows/sendMessage.ts), so it lands as a plain message. Related: #135.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions