Modal Widget close actions are not interpreted anymore #21498
Labels
A-Widgets
O-Uncommon
Most users are unlikely to come across this or unexpected workflow
S-Minor
Impairs non-critical functionality or suitable workarounds exist
T-Defect
X-Regression
Steps to reproduce
matrixWidgetApi.openModalWidget(...)
.matrixWidgetApi.on('action:close_modal', ...)
.matrixWidgetApi.closeModalWidget(...)
.Outcome
What did you expect?
The close message is received by the event handler.
What happened instead?
The event is ignored and element throws an error.
This seems to be introduced by matrix-org/matrix-react-sdk#8052.
In the code, the
ModalWidgetStore#closeModalWidget()
call forwards the optional!widgetRoomId
toWidgetMessagingStore#getMessaging()
that has a required!widgetRoomId
argument. Finally,WidgetUtils#calcWidgetUid(...)
returnsuser_<widget-id>
instead ofroom_<room-id>_<widget-id>
.The solution seems to be that the
StopGapWidget
should forward the correct room id:The
string
vsstring | undefined
situation is still not optimal, but at least the correct id is generated in my tests.Operating system
No response
Browser information
No response
URL for webapp
No response
Application version
No response
Homeserver
No response
Will you send logs?
No
The text was updated successfully, but these errors were encountered: