Skip to content

Commit 4fcd2cd

Browse files
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 209ce10 commit 4fcd2cd

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

bindings/matrix-sdk-ffi/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ All notable changes to this project will be documented in this file.
66

77
## [Unreleased] - ReleaseDate
88

9+
### Features
10+
11+
- Add `RoomInfo::fully_read_event_id` to expose the user's `m.fully_read` event ID.
12+
([#6569](https://github.com/matrix-org/matrix-rust-sdk/pull/6569))
13+
914
## Refactor
1015

1116
- [**breaking**] `SpaceRoomList::rooms` and `SpaceRoomList::subscribe_to_room_updates` are now asynchronous.

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)