feat(push): ring Android calls and harden the relay (#2915)

This commit is contained in:
Hampus authored and GitHub committed 2026-09-24 00:07:15 +02:00
1 parent b16989d567
commit 5fde6eb484
25 files changed
+1050 -120

No files matched your search

+10 -3
View File
@@ -58,10 +58,17 @@ enum Audience {
impl Audience {
fn admits(self, subscription: &Subscription) -> bool {
let voip = subscription.platform() == Some(Platform::IosApnsVoip);
match self {
Self::Standard => !voip,
Self::Ring => voip,
Self::Standard => subscription.platform() != Some(Platform::IosApnsVoip),
Self::Ring => Self::rings(subscription),
}
}
fn rings(subscription: &Subscription) -> bool {
match subscription.platform() {
Some(Platform::IosApnsVoip) => true,
Some(Platform::AndroidFcm) => subscription.is_web_push_registration(),
_ => false,
}
}
}