fix: Enable push on MIPS by switching web-push client
- Use hyper-client to avoid isahc/coarsetime (AtomicU64 on MIPS) - Keep push notifications enabled for MIPS builds - Update CI MIPS build to use default features
This commit is contained in:
@@ -30,6 +30,6 @@ thiserror = "2.0.18"
|
||||
dotenvy = "0.15.7"
|
||||
utoipa = { version = "5.4.0", features = ["axum_extras"] }
|
||||
utoipa-swagger-ui = { version = "9.0.2", features = ["axum"] }
|
||||
web-push = { version = "0.10", optional = true }
|
||||
web-push = { version = "0.10", default-features = false, features = ["hyper-client"], optional = true }
|
||||
base64 = "0.22"
|
||||
openssl = { version = "0.10", features = ["vendored"], optional = true }
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::sync::Arc;
|
||||
use tokio::sync::RwLock;
|
||||
use utoipa::ToSchema;
|
||||
use web_push::{
|
||||
IsahcWebPushClient, SubscriptionInfo, VapidSignatureBuilder, WebPushClient, WebPushMessageBuilder,
|
||||
HyperWebPushClient, SubscriptionInfo, VapidSignatureBuilder, WebPushClient, WebPushMessageBuilder,
|
||||
};
|
||||
|
||||
// VAPID keys - PRODUCTION'DA ENVIRONMENT VARIABLE'DAN ALINMALI!
|
||||
@@ -81,7 +81,7 @@ pub async fn send_push_notification(
|
||||
"tag": "vibetorrent"
|
||||
});
|
||||
|
||||
let client = IsahcWebPushClient::new()?;
|
||||
let client = HyperWebPushClient::new();
|
||||
|
||||
for subscription in subscriptions {
|
||||
let subscription_info = SubscriptionInfo {
|
||||
|
||||
Reference in New Issue
Block a user