mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 21:45:31 +09:00
feat(push): ring Android calls and harden the relay (#2915)
This commit is contained in:
1 parent
b16989d567
commit
5fde6eb484
25 files changed
+1050
-120
No files matched your search
@@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user