Skip to content

feat: add sticky events to SyncUpdate#2238

Open
giles-labrys wants to merge 1 commit into
famedly:mainfrom
giles-labrys:add-sticky-events-to-sync-update
Open

feat: add sticky events to SyncUpdate#2238
giles-labrys wants to merge 1 commit into
famedly:mainfrom
giles-labrys:add-sticky-events-to-sync-update

Conversation

@giles-labrys
Copy link
Copy Markdown

Add support for Sticky Events to the SyncUpdate class used to model the response of the /sync endpoint.

Specifically this is so that its possible to follow the MSC4143: MatrixRTC specification on how to initiate and manage MatrixRTC sessions using the "slot" state event and new concept "sticky" events. The slot state event is not part of this PR to keep it super small and focussed, though that change is also small and can be followed up in another PR (just adding a new EventType for it following the msc_extension directory pattern).

I've not attempted to do an msc_extension approach for sticky events as they are retrieved through the /sync endpoint and it doesn't seem feasible to implement it any other way. These events are nullable and so there is no risk of regression and the MatrixRTC proposal itself is quite stable (though not officially merged yet).

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jan 22, 2026

CLA assistant check
All committers have signed the CLA.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 3.22581% with 30 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.80%. Comparing base (574500e) to head (6d4f0b4).
⚠️ Report is 63 commits behind head on main.

Files with missing lines Patch % Lines
.../msc_extensions/msc_4354_sticky_events/models.dart 0.00% 28 Missing ⚠️
lib/matrix_api_lite/model/sync_update.dart 33.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2238   +/-   ##
=======================================
  Coverage   57.80%   57.80%           
=======================================
  Files         158      159    +1     
  Lines       19679    19756   +77     
=======================================
+ Hits        11375    11420   +45     
- Misses       8304     8336   +32     
Files with missing lines Coverage Δ
lib/matrix_api_lite/model/sync_update.dart 44.38% <33.33%> (-0.19%) ⬇️
.../msc_extensions/msc_4354_sticky_events/models.dart 0.00% <0.00%> (ø)

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 574500e...6d4f0b4. Read the comment docs.

}
}

class StickyEventsUpdate {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please put the model in the msc_extensions folder? I think it's a bit cleaner this way, as this is still a msc. Having sticky as a paramter in /sync is fine then

Copy link
Copy Markdown
Author

@giles-labrys giles-labrys Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done thank you 🙏 - although I think I raised this PR prematurely anyway as I don't think the latest matrix server version I'm working with supports sticky events yet. I can mark this PR as draft or close it and then re-open later when the functionality of the msc is usable?

Edit: Release 1.150 included "Expose matrix-org/matrix-spec-proposals#4354 over the legacy (v3) /sync API. (element-hq/synapse#19487)" so this can now be used.

@giles-labrys giles-labrys force-pushed the add-sticky-events-to-sync-update branch 2 times, most recently from fcc4e5a to 6d4f0b4 Compare February 6, 2026 12:28
@giles-labrys giles-labrys requested a review from td-famedly April 27, 2026 08:16
@giles-labrys
Copy link
Copy Markdown
Author

Hi @td-famedly please can you re-review this?

Release 1.150 included "Expose matrix-org/matrix-spec-proposals#4354 over the legacy (v3) /sync API. (element-hq/synapse#19487)" so the changes here can now be taken advantage of

refactor: move sticky events to msc_extension directory
@giles-labrys giles-labrys force-pushed the add-sticky-events-to-sync-update branch from a976cf5 to 6a4de41 Compare April 27, 2026 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants