trace call timestamp from NSE
This commit is contained in:
parent
ff79c58f44
commit
a1aa45ae10
|
@ -240,8 +240,9 @@ public enum PushRegistrationError: Error {
|
|||
owsAssertDebug(CurrentAppContext().isMainApp)
|
||||
owsAssertDebug(type == .voIP)
|
||||
let payload = payload.dictionaryPayload
|
||||
if let uuid = payload["uuid"] as? String, let caller = payload["caller"] as? String {
|
||||
if let uuid = payload["uuid"] as? String, let caller = payload["caller"] as? String, let timestamp = payload["timestamp"] as? UInt64 {
|
||||
let call = SessionCall(for: caller, uuid: uuid, mode: .answer)
|
||||
call.callMessageTimestamp = timestamp
|
||||
call.reportIncomingCallIfNeeded { error in
|
||||
if let error = error {
|
||||
SNLog("[Calls] Failed to report incoming call to CallKit due to error: \(error)")
|
||||
|
|
|
@ -218,8 +218,8 @@ public final class NotificationServiceExtension : UNNotificationServiceExtension
|
|||
|
||||
private func handleSuccessForIncomingCall(for content: UNMutableNotificationContent, callMessage: CallMessage) {
|
||||
if #available(iOSApplicationExtension 14.5, *) {
|
||||
if let uuid = callMessage.uuid, let caller = callMessage.sender {
|
||||
let payload = ["uuid": uuid, "caller": caller]
|
||||
if let uuid = callMessage.uuid, let caller = callMessage.sender, let timestamp = callMessage.sentTimestamp {
|
||||
let payload = ["uuid": uuid, "caller": caller, "timestamp": timestamp]
|
||||
CXProvider.reportNewIncomingVoIPPushPayload(payload) { error in
|
||||
if let error = error {
|
||||
self.contentHandler!(content)
|
||||
|
|
Loading…
Reference in New Issue