Skip to content

Widgets do not reliably receive room invitations #20622

@dhenneke

Description

@dhenneke

Steps to reproduce

We want to create a widget that reacts to room invitations (and the set of stripped events that are provided for this room). However, when a room is already known to Element, the events are not reliably sent to the widget.

I created an example widget that shows the issue: https://github.com/dhenneke/element-bug-invite

Here is a video that demonstrates the behavior:

  1. The user is invited. The widget receives the event on the first invite. ✅
  2. The invite is cancelled. The widget receives the leave event. ✅
  3. The user is invited. The widget does not receive the event! ❌ (but Element shows the invitation)
  4. The invite is cancelled. The widget receives the leave event. ✅
bug.mp4

You can also test it with the deployed widget with /addwidget https://dhenneke-element-bug-invite.netlify.app/.

I think the event is skipped due to this logic, but I'm not sure what's special about these events that make them be skipped.

Outcome

What did you expect?

The widget receives the events

What happened instead?

The widget doesn't receive the events.

Operating system

macOS

Browser information

No response

URL for webapp

develop.element.io

Application version

Element version: 840867b-react-47cbef2af2c9-js-652b3a9208f0 Olm version: 3.2.8

Homeserver

No response

Will you send logs?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-WidgetsO-UncommonMost users are unlikely to come across this or unexpected workflowS-MinorImpairs non-critical functionality or suitable workarounds existT-Defect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions