Rocket.Chat.Apps-engine icon indicating copy to clipboard operation
Rocket.Chat.Apps-engine copied to clipboard

[BUG] Contextual bar elements always return wrong roomID for action handler

Open RyanbowZ opened this issue 1 year ago • 1 comments

When adding an element (e.g. a button) on a contextual bar, it will set some Action IDs, and then the executeActionHandler is expected to handle the action when the element is triggered and process it according to that ID. But in code implementation, despite that element is triggered, the room id get by this handler is wrong, which is just the general room rather than the room that the contextual bar was in.

Current temporary solution: from @vipin.chaudhary and @zishan.ahmad When you open the contextual bar it's opening in correct room mean the action you are using to open the room get's the correct I'd but when you make a action handler it's getting the general room The fix for this one is when you do a action to open the contextual bar just store the roomId in persistence for each user. And when you need to perform an action use that stored room I'd to get the room info using room reader When you are done just remove the persistence.

RyanbowZ avatar Jul 28 '24 16:07 RyanbowZ

Hello, @RyanbowZ. I believe this is not a bug on the apps-engine. Looks like the request of the ui.interaction is being sent without the rid param so, the apps-engine doing a findOne() that returns general.

scuciatto avatar Aug 01 '24 11:08 scuciatto