RocketChat / Rocket.Chat.Apps-engine

The Rocket.Chat Apps engine and definitions.

Home Page:https://rocketchat.github.io/Rocket.Chat.Apps-engine/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

nothing happens when MESSAGE_ACTION registered button is clicked

sveatlo opened this issue · comments

I created an application with a registered button in message actions:

public async initialize(configuration: IConfigurationExtend): Promise<void> {
    ...
    configuration.ui.registerButton({
        actionId: "createNew",
        labelI18n: "msg_action_button_label",
        context: UIActionButtonContext.MESSAGE_ACTION,
    });
...
}

public async executeActionButtonHandler(
    context: UIKitActionButtonInteractionContext,
    _read: IRead,
    _http: IHttp,
    _persistence: IPersistence,
    modify: IModify
): Promise<IUIKitResponse> {
    this.getLogger().debug("handling action button", context);

    return context.getInteractionResponder().successResponse();
}

When I click the button, nothing happens -- the popup menu doesn't even disappear no matter how many times I click the button or where on the button I click.

However when I change the button's context to either UIActionButtonContext.MESSAGE_BOX_ACTION or UIActionButtonContext.ROOM_ACTION I get the log as I'd expect. Am I doing something wrong or is this a bug?

Just to be sure, I checked with a blank app created using rc-apps create with same results.

@rocket.chat/apps-engine version 1.29.1