-
Notifications
You must be signed in to change notification settings - Fork 251
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
Add support for MSC2867 - Manually marking rooms as unread #3076
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3076 +/- ##
==========================================
+ Coverage 83.70% 83.79% +0.08%
==========================================
Files 224 224
Lines 23478 23496 +18
==========================================
+ Hits 19653 19688 +35
+ Misses 3825 3808 -17 ☔ View full report in Codecov by Sentry. |
45fc293
to
606fa62
Compare
606fa62
to
3f21678
Compare
What am I doing wrong with enabling that |
This PR is related to #3037 |
Please, update the feature flag on Ruma, and start again. It's probably a timeout from indexeddb. |
I don't understand what that means, move it back to the workspace cargo file? |
crates/matrix-sdk/src/room/mod.rs
Outdated
@@ -17,12 +17,12 @@ use matrix_sdk_common::timeout::timeout; | |||
use mime::Mime; | |||
#[cfg(feature = "e2e-encryption")] | |||
use ruma::events::{ | |||
room::encrypted::OriginalSyncRoomEncryptedEvent, AnySyncMessageLikeEvent, AnySyncTimelineEvent, | |||
SyncMessageLikeEvent, | |||
marked_unread::MarkedUnreadEventContent, room::encrypted::OriginalSyncRoomEncryptedEvent, |
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.
The CI is reporting an error here: MarkedUnreadEventContent
is imported only when the feature e2e-encryption
is enabled. We want it even if it's disabled.
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.
I've pushed bb3f7ed to solve it.
// known to the store. If neither of | ||
// those are true then the room is `unknown` and we cannot | ||
// process its account data | ||
if let AnyRoomAccountDataEvent::MarkedUnread(e) = event { |
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.
AnyRoomAccountDataEvent::MarkedUnread
exists if and only if the ruma/unstable-msc2867
feature is enabled in the crates/matrix-sdk-base/Cargo.toml
file.
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.
I've pushed bb3f7ed to solve it.
- also fixes how room account data is processed and adds tests for both when rooms and extensions are present or just extensions
bb3f7ed
to
df61037
Compare
Requires ruma/ruma#1721
This PR add support for manually marking rooms as unread through the means of MSC2867 which introduces a new room account data flag.
Rooms now have a new
mark_unread(unread: bool)
method for setting the flag as well as ais_marked_unread
property, which is also exposed on RoomInfoOn the FFI layer the method above is used in conjucture with
send_read_receipt
to fully mark a room as read, which the client should do from the room list (outside of the timeline)