mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-12-03 05:47:33 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b09176163 | ||
|
|
aabdb5003c |
No files matched your search
@@ -0,0 +1 @@
|
||||
Errors while sending push notifications will now appear in the server log under more conditions, and will be registered as failures in Prometheus metrics.
|
||||
@@ -970,6 +970,8 @@ impl Service {
|
||||
}
|
||||
}
|
||||
|
||||
let mut first_push_error = None;
|
||||
|
||||
for pdu in pdus {
|
||||
// Redacted events are not notification targets (we don't send push
|
||||
// for them)
|
||||
@@ -995,15 +997,27 @@ impl Service {
|
||||
.try_into()
|
||||
.expect("notification count can't go that high");
|
||||
|
||||
let _response = self
|
||||
let response = self
|
||||
.services
|
||||
.pusher
|
||||
.send_push_notice(&user_id, unread, &pusher, rules_for_user, &pdu)
|
||||
.await
|
||||
.map_err(|e| (Destination::Push(user_id.clone(), pushkey.clone()), e));
|
||||
.map_err(|e| (Destination::Push(user_id.clone(), pushkey.clone()), Box::new(e)));
|
||||
|
||||
if let Err(err) = response {
|
||||
error!(event = %pdu.event_id, pusher = %pusher.app_display_name, "Failed to deliver push notification: {err:?}");
|
||||
|
||||
if first_push_error.is_none() {
|
||||
first_push_error = Some(err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(Destination::Push(user_id, pushkey))
|
||||
if let Some(err) = first_push_error {
|
||||
Err(err)
|
||||
} else {
|
||||
Ok(Destination::Push(user_id, pushkey))
|
||||
}
|
||||
}
|
||||
|
||||
async fn send_events_dest_federation(
|
||||
|
||||
Reference in new issue
Block a user