Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bindings/matrix-sdk-ffi/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ All notable changes to this project will be documented in this file.
([#5614](https://github.com/matrix-org/matrix-rust-sdk/pull/5614))
- Expose `m.federate` in `OtherState::RoomCreate` and `history_visibility` in `OtherState::RoomHistoryVisibility`, allowing clients to know whether a room federates and how its history is shared in the appropriate timeline events.
- Expose `join_rule` in `OtherState::RoomJoinRules`, allowing clients to know the join rules of a room from the appropriate timeline events.
- Expose `is_space` in `NotificationRoomInfo`, allowing clients to determine if the room that triggered the notification is a space.

### Changes

Expand Down
1 change: 1 addition & 0 deletions bindings/matrix-sdk-ffi/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 2 additions & 0 deletions bindings/matrix-sdk-ffi/src/notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ pub struct NotificationRoomInfo {
pub joined_members_count: u64,
pub is_encrypted: Option<bool>,
pub is_direct: bool,
pub is_space: bool,
}

#[derive(uniffi::Record)]
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions crates/matrix-sdk-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ All notable changes to this project will be documented in this file.
([#5835](https://github.com/matrix-org/matrix-rust-sdk/pull/5835))
- Add support for top level space ordering through [MSC3230](https://github.com/matrix-org/matrix-spec-proposals/pull/3230)
and `m.space_order` room account data fields ([#5799](https://github.com/matrix-org/matrix-rust-sdk/pull/5799))
- Expose `is_space` in `NotificationItem`, allowing clients to determine if the room that triggered the notification is a space.

### Refactor

Expand Down
3 changes: 3 additions & 0 deletions crates/matrix-sdk-ui/src/notification_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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,
Expand Down
Loading