mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-24 16:48:52 -04:00
Use Action covenience methods
Now Action::Coalesce will also generate a notification.
This commit is contained in:
committed by
Jonas Platte
parent
e9058f58be
commit
59edc22a35
@@ -411,7 +411,7 @@ impl BaseClient {
|
||||
if let Some(context) = &push_context {
|
||||
let actions = push_rules.get_actions(&event.event, context);
|
||||
|
||||
if actions.iter().any(|a| matches!(a, Action::Notify)) {
|
||||
if actions.iter().any(Action::should_notify) {
|
||||
changes.add_notification(
|
||||
room_id,
|
||||
Notification::new(
|
||||
|
||||
@@ -35,7 +35,7 @@ use ruma::{
|
||||
relation::Annotation,
|
||||
AnyMessageLikeEventContent, AnySyncTimelineEvent,
|
||||
},
|
||||
push::{Action, Tweak},
|
||||
push::Action,
|
||||
serde::Raw,
|
||||
EventId, MilliSecondsSinceUnixEpoch, OwnedEventId, OwnedTransactionId, OwnedUserId,
|
||||
TransactionId, UserId,
|
||||
@@ -691,8 +691,7 @@ async fn handle_remote_event<P: RoomDataProvider>(
|
||||
} else {
|
||||
Default::default()
|
||||
};
|
||||
let is_highlighted =
|
||||
push_actions.iter().any(|a| matches!(a, Action::SetTweak(Tweak::Highlight(true))));
|
||||
let is_highlighted = push_actions.iter().any(Action::is_highlight);
|
||||
let event_meta = TimelineEventMetadata {
|
||||
sender,
|
||||
sender_profile,
|
||||
|
||||
Reference in New Issue
Block a user