[MatrixRTC] Sticky Events support (MSC4354)#5017
Conversation
4ff6fb9 to
dde4abb
Compare
f8e0385 to
7750916
Compare
| interface SessionMembershipsForRoomOpts { | ||
| listenForStickyEvents: boolean; | ||
| listenForMemberStateEvents: boolean; | ||
| } |
There was a problem hiding this comment.
Wondering if we really want to make this configurable?
It would be great if we can just always make it listen to this?
Not sure its possible however...
Do you have an idea for a case where "always on" would break?
There was a problem hiding this comment.
So you can do both at the same time? Or does it fall back to state on some trigger?
If this is temporary, it might be worth a comment to kill state as soon as event/sticky is deployed enough?
| } | ||
|
|
||
| this.client.on(ClientEvent.Room, this.onRoom); | ||
| this.client.on(ClientEvent.Event, this.onEvent); |
There was a problem hiding this comment.
this in combination with:
this.roomSubset.on(RoomEvent.StickyEvents, this.onStickyEventUpdate);
will result in two calls to recalculateSessionMembers once via refreshRoom -> onRTCSessionMemberUpdate -> recalculateSessionMembers And a second time throughonStickyEventUpdate->`recalculateSessionMembers.
Or is there any check so one of them gets ignored?
A possible solution would be to check if the associated room already has a session (in onRoom) and if so, we do not call refresh room? So it only gets called on creating a new session?
This logic maybe should be applied to all of this file. refreshRoom should be: refreshSessionStore/Map and than we expect the session itself to listen to all the evnt updates. Listeners in the SessionManager only are responsible to find out if new sessions need to be created!
34be9c8 to
e3157e6
Compare
| interface SessionMembershipsForRoomOpts { | ||
| listenForStickyEvents: boolean; | ||
| listenForMemberStateEvents: boolean; | ||
| } |
There was a problem hiding this comment.
So you can do both at the same time? Or does it fall back to state on some trigger?
If this is temporary, it might be worth a comment to kill state as soon as event/sticky is deployed enough?
Signed-off-by: Timo K <toger5@hotmail.de>
robintown
left a comment
There was a problem hiding this comment.
I see just one blocker here which is the logging issue:
Co-authored-by: Robin <robin@robin.town>
|
Depends on #5028
This PR adds support for sticky events in the MatrixRTCSession: