mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 23:18:27 +02:00
Add sanity check for the method
This commit is contained in:
@@ -32,7 +32,7 @@ class NotificationService: UNNotificationServiceExtension {
|
|||||||
|
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
|
|
||||||
/// Receiving dates for notifications
|
/// Receiving dates for notifications. Keys are eventId's
|
||||||
private var receiveDates: [String: Date] = [:]
|
private var receiveDates: [String: Date] = [:]
|
||||||
|
|
||||||
/// Content handlers. Keys are eventId's
|
/// Content handlers. Keys are eventId's
|
||||||
@@ -588,6 +588,11 @@ class NotificationService: UNNotificationServiceExtension {
|
|||||||
|
|
||||||
if event.isEncrypted {
|
if event.isEncrypted {
|
||||||
if #available(iOS 13.0, *) {
|
if #available(iOS 13.0, *) {
|
||||||
|
guard event.clear != nil else {
|
||||||
|
NSLog("[NotificationService] sendVoipPush: Do not send a VoIP push for undecrypted event, it'll cause a crash.")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
pushNotificationStore.storeCallInvite(event.clear)
|
pushNotificationStore.storeCallInvite(event.clear)
|
||||||
} else {
|
} else {
|
||||||
pushNotificationStore.storeCallInvite(event)
|
pushNotificationStore.storeCallInvite(event)
|
||||||
|
|||||||
Reference in New Issue
Block a user