Compare commits

..
Author SHA1 Message Date
Ginger 84b5316117 chore: News fragment 2026-12-02 23:12:06 -05:00
Ginger d59ae90fc9 refactor: Remove element_hacks 2026-12-02 23:06:01 -05:00
10 changed files with 7 additions and 34 deletions

No files matched your search

-1
View File
@@ -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.
+1
View File
@@ -0,0 +1 @@
The `element_hacks` build feature, which has done almost nothing for many versions, has been removed completely. Contributed by @ginger.
+1 -1
View File
@@ -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
View File
@@ -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
-3
View File
@@ -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",
-5
View File
@@ -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",
-3
View File
@@ -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",
-1
View File
@@ -30,7 +30,6 @@ console = [
"dep:rustyline-async",
"dep:termimad",
]
element_hacks = []
gzip_compression = [
"conduwuit-core/gzip_compression",
"reqwest/gzip",
+1 -2
View File
@@ -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))
+3 -17
View File
@@ -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(