mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-11-17 10:48:18 -07:00
fix: malformed pushrule error when event does not trigger any actions
This commit is contained in:
parent
588de12d79
commit
b0ea692706
@ -216,16 +216,11 @@ pub async fn send_push_notice(
|
|||||||
notify = Some(n);
|
notify = Some(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
let notify = notify.ok_or_else(|| {
|
if notify == Some(true) {
|
||||||
Error::bad_database(
|
|
||||||
r#"Malformed pushrule contains none of these actions: ["dont_notify", "notify", "coalesce"]"#,
|
|
||||||
)
|
|
||||||
})?;
|
|
||||||
|
|
||||||
if notify {
|
|
||||||
send_notice(unread, pusher, tweaks, pdu, db).await?;
|
send_notice(unread, pusher, tweaks, pdu, db).await?;
|
||||||
}
|
}
|
||||||
|
// Else the event triggered no actions
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user