diff --git a/bindings/matrix-sdk-ffi/CHANGELOG.md b/bindings/matrix-sdk-ffi/CHANGELOG.md index 47e2a7e30a3..1e20dccf50e 100644 --- a/bindings/matrix-sdk-ffi/CHANGELOG.md +++ b/bindings/matrix-sdk-ffi/CHANGELOG.md @@ -78,6 +78,7 @@ All notable changes to this project will be documented in this file. ### Features +- Expose `is_space` in `NotificationRoomInfo`, allowing clients to determine if the room that triggered the notification is a space. - Add push actions to `NotificationItem` and replace `SyncNotification` with `NotificationItem`. ([#5835](https://github.com/matrix-org/matrix-rust-sdk/pull/5835)) - Add `Client::new_grant_login_with_qr_code_handler` for granting login to a new device by way of diff --git a/bindings/matrix-sdk-ffi/src/client.rs b/bindings/matrix-sdk-ffi/src/client.rs index e67ee6b79b3..91365b73606 100644 --- a/bindings/matrix-sdk-ffi/src/client.rs +++ b/bindings/matrix-sdk-ffi/src/client.rs @@ -967,6 +967,7 @@ impl Client { joined_members_count: room.joined_members_count(), is_encrypted: Some(room.encryption_state().is_encrypted()), is_direct, + is_space: room.is_space(), }; listener.on_notification( diff --git a/bindings/matrix-sdk-ffi/src/notification.rs b/bindings/matrix-sdk-ffi/src/notification.rs index c79341773b3..0b3577189b8 100644 --- a/bindings/matrix-sdk-ffi/src/notification.rs +++ b/bindings/matrix-sdk-ffi/src/notification.rs @@ -36,6 +36,7 @@ pub struct NotificationRoomInfo { pub joined_members_count: u64, pub is_encrypted: Option, pub is_direct: bool, + pub is_space: bool, } #[derive(uniffi::Record)] @@ -82,6 +83,7 @@ impl NotificationItem { joined_members_count: item.joined_members_count, is_encrypted: item.is_room_encrypted, is_direct: item.is_direct_message_room, + is_space: item.is_space, }, is_noisy: item.is_noisy, has_mention: item.has_mention, diff --git a/crates/matrix-sdk-ui/CHANGELOG.md b/crates/matrix-sdk-ui/CHANGELOG.md index d0b1a389bf2..703a10f3d21 100644 --- a/crates/matrix-sdk-ui/CHANGELOG.md +++ b/crates/matrix-sdk-ui/CHANGELOG.md @@ -10,6 +10,7 @@ All notable changes to this project will be documented in this file. ### Features +- Expose `is_space` in `NotificationItem`, allowing clients to determine if the room that triggered the notification is a space. - [**breaking**] The `LatestEventValue::Local` type gains 2 new fields: `sender` and `profile`. ([#5885](https://github.com/matrix-org/matrix-rust-sdk/pull/5885)) diff --git a/crates/matrix-sdk-ui/src/notification_client.rs b/crates/matrix-sdk-ui/src/notification_client.rs index 60c65c3d939..a18086cf12b 100644 --- a/crates/matrix-sdk-ui/src/notification_client.rs +++ b/crates/matrix-sdk-ui/src/notification_client.rs @@ -881,6 +881,8 @@ pub struct NotificationItem { pub is_direct_message_room: bool, /// Numbers of members who joined the room. pub joined_members_count: u64, + /// Is the room a space? + pub is_space: bool, /// Is it a noisy notification? (i.e. does any push action contain a sound /// action) @@ -982,6 +984,7 @@ impl NotificationItem { .map(|state| state.is_encrypted()) .ok(), joined_members_count: room.joined_members_count(), + is_space: room.is_space(), is_noisy, has_mention, thread_id,