Skip to content

Commit

Permalink
ffi: add can_homeserver_push_encrypted_event_to_device method
Browse files Browse the repository at this point in the history
Signed-off-by: hanadi92 <[email protected]>
  • Loading branch information
hanadi92 committed Mar 6, 2024
1 parent ffda84c commit 175fae5
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions bindings/matrix-sdk-ffi/src/notification_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,16 @@ impl NotificationSettings {
}
}

/// Check whether [MSC 4028 push rule][rule] is enabled on the homeserver.
///
/// [rule]: https://github.com/matrix-org/matrix-spec-proposals/blob/giomfo/push_encrypted_events/proposals/4028-push-all-encrypted-events-except-for-muted-rooms.md
pub async fn can_homeserver_push_encrypted_event_to_device(&self) -> bool {
match self.sdk_client.unstable_features().await {
Ok(unstable_feature) => *unstable_feature.get("org.matrix.msc4028").unwrap_or(&false),
Err(_) => false,
}
}

/// Set whether user mentions are enabled.
pub async fn set_user_mention_enabled(
&self,
Expand Down

0 comments on commit 175fae5

Please sign in to comment.