-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(WidgetDriver): Send state from state sync and not from timeline to widget #4254
Conversation
ca4df5f
to
2380af6
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4254 +/- ##
==========================================
+ Coverage 84.87% 84.90% +0.03%
==========================================
Files 274 274
Lines 29712 29719 +7
==========================================
+ Hits 25218 25233 +15
+ Misses 4494 4486 -8 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Stefan Ceriu <[email protected]> Signed-off-by: Timo <[email protected]>
Co-authored-by: Stefan Ceriu <[email protected]> Signed-off-by: Timo <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍
@stefanceriu @bnjbvr, I asked this in one of the room but it does not hurt to ask for double confirmation that this comment is actually what is happening:
|
Looks like that to me, yes:
|
Confirmed with @bnjbvr that this is indeed correct, will go ahead and merge it 👍 |
This PR changes the source of messages send to the widget. Instead of using:
let handle = self.room.add_event_handler(move |raw: Raw<AnySyncTimelineEvent>| {})
which listens to all events form the timeline section of the sync, we use two listeners for state and message like:
let handle = self.room.add_event_handler(move |raw: Raw<AnySyncStateEvent>| {})
And
let handle = self.room.add_event_handler(move |raw: Raw<AnySyncMessageLikeEvent>| {})
AnySyncStateEvent
should only get events from the state block of the SSS response.and
AnySyncMessageLikeEvent
all the message like events from the timeline block.This makes the behaviour equivalent to: element-hq/element-web#28422
Signed-off-by: