Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -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
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 @@ -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))
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