Skip to content

Commit

Permalink
notification client(bugfix): don't filter out the notification if we …
Browse files Browse the repository at this point in the history
…couldn't compute push actions with /context

This is in line with what the other method using sliding sync does. This
wasn't tested before, because this required `filter_by_push_rules()` to
be enabled in the notification client; now that it's the default, the
test revealed the bug, and so it could be fixed.
  • Loading branch information
bnjbvr committed May 1, 2024
1 parent 0ba4e42 commit f69db1d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions crates/matrix-sdk-ui/src/notification_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,10 @@ impl NotificationClient {
timeline_event = decrypted_event;
}

if !timeline_event
.push_actions
.as_ref()
.is_some_and(|actions| actions.iter().any(|a| a.should_notify()))
{
return Ok(None);
if let Some(actions) = timeline_event.push_actions.as_ref() {
if !actions.iter().any(|a| a.should_notify()) {
return Ok(None);
}
}

Ok(Some(
Expand Down

0 comments on commit f69db1d

Please sign in to comment.