Send VoIP pushes fro Jitsi widget events

This commit is contained in:
ismailgulek
2021-03-19 03:00:38 +03:00
parent a6b2bce0d9
commit 04de548dfa

View File

@@ -373,6 +373,18 @@ class NotificationService: UNNotificationServiceExtension {
}
notificationBody = NSString.localizedUserNotificationString(forKey: "STICKER_FROM_USER", arguments: [eventSenderName as Any])
case .custom:
if event.type == kWidgetMatrixEventTypeString || event.type == kWidgetModularEventTypeString {
if let content = event.content, let type = content["type"] as? String {
if type == kWidgetTypeJitsiV1 || type == kWidgetTypeJitsiV2 {
notificationBody = NSString.localizedUserNotificationString(forKey: "VIDEO_CONF_FROM_USER", arguments: [eventSenderName as Any])
// call notifications should stand out from normal messages, so we don't stack them
threadIdentifier = nil
self.sendVoipPush(forEvent: event)
}
}
}
default:
break
}