v0.14.21
This commit is contained in:
+4
-12
@@ -151,10 +151,7 @@ fn persist_notification_status(
|
||||
};
|
||||
let updated = with_notification_status(metadata, status, reason, provider);
|
||||
match state.db.update_event_metadata(event_id, &updated) {
|
||||
Ok(true) => state.broadcast(
|
||||
"log.updated",
|
||||
json!({"id": event_id, "metadata": updated}),
|
||||
),
|
||||
Ok(true) => state.broadcast("log.updated", json!({"id": event_id, "metadata": updated})),
|
||||
Ok(false) => tracing::warn!(event_id, "cannot update missing event log metadata"),
|
||||
Err(err) => tracing::warn!(event_id, error=?err, "cannot update event log metadata"),
|
||||
}
|
||||
@@ -224,14 +221,9 @@ pub async fn dispatch(
|
||||
_ => Err("unsupported notification provider".into()),
|
||||
};
|
||||
match result {
|
||||
Ok(()) => persist_notification_status(
|
||||
&state,
|
||||
event_id,
|
||||
&metadata,
|
||||
"sent",
|
||||
None,
|
||||
&cfg.provider,
|
||||
),
|
||||
Ok(()) => {
|
||||
persist_notification_status(&state, event_id, &metadata, "sent", None, &cfg.provider)
|
||||
}
|
||||
Err(err) => {
|
||||
persist_notification_status(
|
||||
&state,
|
||||
|
||||
Reference in New Issue
Block a user