Closed bnjbvr closed 1 month ago
Note: the timeline events aren't handled by user-defined event handlers, when it comes to invited rooms. Adding support for that would be sufficient to solve the issue here, since both the SS proxy and native SSS seem to return the full invite event as part of the timeline (or required_state), for an invited room.
This requires substantial changes in the SDK (i.e. providing the timeline to an invited room, despite sync v2 not providing any timeline events in that case), and this is working good enough right now, so it's probably not needed at the moment. Since this was for the context of notifications, implementing a more complete /room/ID/context endpoint would likely be more beneficial to all clients.
The full invite event (including event id) might be present in the timeline section of a sliding sync response, so in theory we could look for a non-stripped room member event, and match the push notification event id against the invite event id from the timeline portion.
Needs a bit more investigation and confirmation by trying it out with a real-world synapse server.