Skip to content

Commit 10c0a86

Browse files
danderson-contstefanceriu
authored andcommitted
feat(ffi): expose RoomInfo::fully_read_event_id
`m.fully_read` is now available on the FFI `RoomInfo` record Signed-off-by: Daniel Anderson <daniel.anderson@toptal.com>
1 parent a80fa91 commit 10c0a86

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add `RoomInfo::fully_read_event_id` to expose the user's `m.fully_read` event ID.

bindings/matrix-sdk-ffi/src/room/room_info.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ pub struct RoomInfo {
107107
/// Events causing mentions/highlights for the user, according to their
108108
/// notification settings.
109109
num_unread_mentions: u64,
110+
/// Event ID of the user's `m.fully_read` marker for this room, if any.
111+
fully_read_event_id: Option<String>,
110112
/// The currently pinned event ids.
111113
pinned_event_ids: Vec<String>,
112114
/// The join rule for this room, if known.
@@ -206,6 +208,7 @@ impl RoomInfo {
206208
num_unread_messages: room.num_unread_messages(),
207209
num_unread_notifications: room.num_unread_notifications(),
208210
num_unread_mentions: room.num_unread_mentions(),
211+
fully_read_event_id: room.fully_read_event_id().map(|id| id.to_string()),
209212
pinned_event_ids,
210213
join_rule,
211214
history_visibility: room.history_visibility_or_default().try_into()?,

0 commit comments

Comments
 (0)