From 57a04f4ff5c5e11c60e03d4adb5b08130376bef2 Mon Sep 17 00:00:00 2001 From: ryanzhao Date: Mon, 11 Oct 2021 15:23:19 +1100 Subject: [PATCH] show incoming call notification --- .../NotificationServiceExtension.swift | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/SessionNotificationServiceExtension/NotificationServiceExtension.swift b/SessionNotificationServiceExtension/NotificationServiceExtension.swift index d8bd9cd22..078db2e3f 100644 --- a/SessionNotificationServiceExtension/NotificationServiceExtension.swift +++ b/SessionNotificationServiceExtension/NotificationServiceExtension.swift @@ -87,6 +87,13 @@ public final class NotificationServiceExtension : UNNotificationServiceExtension case .new(_, let name, _, _, _, _): snippet = "\(senderDisplayName) added you to \(name)" default: return self.completeSilenty() } + case let callMessage as CallMessage: + MessageReceiver.handleCallMessage(callMessage, using: transaction) + notificationContent.userInfo = userInfo + notificationContent.badge = 1 + notificationContent.title = "Session" + notificationContent.body = "\(senderDisplayName) is calling..." + return self.handleSuccess(for: notificationContent) default: return self.completeSilenty() } if (senderPublicKey == userPublicKey) {