notification client(bugfix): don't filter out the notification if we 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.
This commit is contained in:
Benjamin Bouvier
2024-05-01 13:09:01 +02:00
parent 0ba4e42161
commit f69db1d169

View File

@@ -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(