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 | |
|---|---|---|---|
|
|
84b5316117 | ||
|
|
d59ae90fc9 |
No files matched your search
@@ -1 +0,0 @@
|
||||
Errors while sending push notifications will now appear in the server log under more conditions, and will be registered as failures in Prometheus metrics.
|
||||
@@ -0,0 +1 @@
|
||||
The `element_hacks` build feature, which has done almost nothing for many versions, has been removed completely. Contributed by @ginger.
|
||||
@@ -102,7 +102,7 @@ look like this:
|
||||
RUSTFLAGS="--cfg tokio_unstable" cargo +nightly build \
|
||||
--release \
|
||||
--no-default-features \
|
||||
--features=systemd,element_hacks,gzip_compression,brotli_compression,zstd_compression,tokio_console
|
||||
--features=systemd,gzip_compression,brotli_compression,zstd_compression,tokio_console
|
||||
```
|
||||
|
||||
You will also need to enable the `tokio_console` config option in Continuwuity
|
||||
|
||||
+1
-1
@@ -146,7 +146,7 @@ cargo clippy \
|
||||
--locked \
|
||||
--profile test \
|
||||
--no-default-features \
|
||||
--features=console,systemd,element_hacks,direct_tls,perf_measurements,brotli_compression \
|
||||
--features=console,systemd,direct_tls,perf_measurements,brotli_compression \
|
||||
--color=always \
|
||||
-- \
|
||||
-D warnings
|
||||
|
||||
@@ -21,9 +21,6 @@ brotli_compression = [
|
||||
"conduwuit-service/brotli_compression",
|
||||
"reqwest/brotli",
|
||||
]
|
||||
element_hacks = [
|
||||
"conduwuit-service/element_hacks",
|
||||
]
|
||||
gzip_compression = [
|
||||
"conduwuit-core/gzip_compression",
|
||||
"conduwuit-service/gzip_compression",
|
||||
|
||||
@@ -55,7 +55,6 @@ default = [
|
||||
standard = [
|
||||
"brotli_compression",
|
||||
"direct_tls",
|
||||
"element_hacks",
|
||||
"gzip_compression",
|
||||
"io_uring",
|
||||
"jemalloc_conf",
|
||||
@@ -86,10 +85,6 @@ console = [
|
||||
direct_tls = [
|
||||
"conduwuit-router/direct_tls"
|
||||
]
|
||||
element_hacks = [
|
||||
"conduwuit-service/element_hacks",
|
||||
"conduwuit-router/element_hacks",
|
||||
]
|
||||
gzip_compression = [
|
||||
"conduwuit-core/gzip_compression",
|
||||
"conduwuit-router/gzip_compression",
|
||||
|
||||
@@ -27,9 +27,6 @@ direct_tls = [
|
||||
"axum-server/tls-rustls-no-provider",
|
||||
"dep:axum-server-dual-protocol",
|
||||
]
|
||||
element_hacks = [
|
||||
"conduwuit-api/element_hacks",
|
||||
]
|
||||
gzip_compression = [
|
||||
"conduwuit-admin/gzip_compression",
|
||||
"conduwuit-api/gzip_compression",
|
||||
|
||||
@@ -30,7 +30,6 @@ console = [
|
||||
"dep:rustyline-async",
|
||||
"dep:termimad",
|
||||
]
|
||||
element_hacks = []
|
||||
gzip_compression = [
|
||||
"conduwuit-core/gzip_compression",
|
||||
"reqwest/gzip",
|
||||
|
||||
@@ -75,8 +75,7 @@ impl Service {
|
||||
"lazy loading should be enabled by your options"
|
||||
);
|
||||
|
||||
let include_redundant = cfg!(feature = "element_hacks")
|
||||
|| ctx.options.is_some_and(Options::include_redundant_members);
|
||||
let include_redundant = ctx.options.is_some_and(Options::include_redundant_members);
|
||||
|
||||
let witness = self
|
||||
.witness(ctx, senders.iter().map(AsRef::as_ref))
|
||||
|
||||
@@ -970,8 +970,6 @@ 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)
|
||||
@@ -997,27 +995,15 @@ 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()), 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);
|
||||
}
|
||||
}
|
||||
.map_err(|e| (Destination::Push(user_id.clone(), pushkey.clone()), e));
|
||||
}
|
||||
|
||||
if let Some(err) = first_push_error {
|
||||
Err(err)
|
||||
} else {
|
||||
Ok(Destination::Push(user_id, pushkey))
|
||||
}
|
||||
Ok(Destination::Push(user_id, pushkey))
|
||||
}
|
||||
|
||||
async fn send_events_dest_federation(
|
||||
|
||||
Reference in new issue
Block a user