mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
feat(push): ring incoming calls on Apple PushKit devices (#2911)
This commit is contained in:
1 parent
c9754ac11a
commit
b16989d567
25 files changed
+878
-83
No files matched your search
@@ -467,6 +467,7 @@ const MobilePushPlatformSchema = createNamedStringLiteralUnion(
|
||||
[
|
||||
['android_fcm', 'ANDROID_FCM', 'Firebase Cloud Messaging (Android)'],
|
||||
['ios_apns', 'IOS_APNS', 'Apple Push Notification Service (iOS)'],
|
||||
['ios_apns_voip', 'IOS_APNS_VOIP', 'Apple PushKit VoIP push, used only to ring an incoming call (iOS)'],
|
||||
['android_unified_push', 'ANDROID_UNIFIED_PUSH', 'UnifiedPush (Android without Google services)'],
|
||||
],
|
||||
'The mobile push notification platform',
|
||||
@@ -501,7 +502,10 @@ export const RegisterMobileDeviceRequest = z
|
||||
.superRefine((value, ctx) => {
|
||||
const tokenIsUrl = URLType.safeParse(value.token).success;
|
||||
const isWebPushRegistration =
|
||||
value.platform === 'android_unified_push' || value.encryption_key != null || value.auth_secret != null;
|
||||
value.platform === 'android_unified_push' ||
|
||||
value.platform === 'ios_apns_voip' ||
|
||||
value.encryption_key != null ||
|
||||
value.auth_secret != null;
|
||||
if (!isWebPushRegistration) {
|
||||
if (tokenIsUrl) {
|
||||
ctx.addIssue({
|
||||
|
||||
Reference in new issue
Block a user