diff --git a/RiotNSE/NotificationService.swift b/RiotNSE/NotificationService.swift index e1c319696..199220f2b 100644 --- a/RiotNSE/NotificationService.swift +++ b/RiotNSE/NotificationService.swift @@ -27,7 +27,6 @@ class NotificationService: UNNotificationServiceExtension { enum Constants { static let voipPushRequestTimeout: TimeInterval = 15 static let timeNeededToSendVoIPPushes: TimeInterval = 20 - static let tchapCallInviteNotificationDiscardDelta = 10.0 // Tchap: max age of call event before ignoring it } } @@ -863,17 +862,6 @@ class NotificationService: UNNotificationServiceExtension { // Starting from iOS 14.5, SDK can "Reports a new incoming call after your notification service extension decrypts a VoIP call request." // See: https://developer.apple.com/documentation/callkit/cxprovider/3727263-reportnewincomingvoippushpayload - - // from Element X : https://github.com/element-hq/element-x-ios/pull/2862/files#diff-1ff0fcebaadd2768e042e7bbafc1321cc5a73089ac1692dc3749492fa2881d91R203 - // Checks if it's still time relevant (max 10 seconds old) and whether it should ring - // - // Should prevent ghost ringing when old m.call.invite are dispatched lately - - let timestamp = Date(timeIntervalSince1970: TimeInterval(event.age / 1000)) - guard abs(timestamp.timeIntervalSinceNow) < NSE.Constants.tchapCallInviteNotificationDiscardDelta else { - MXLog.info("Call notification is too old, handling as push notification") - return - } // Build th payload expected by the application. var payload = [String: String]() diff --git a/changelog.d/1076.change b/changelog.d/1076.change new file mode 100644 index 000000000..ebc1f4fae --- /dev/null +++ b/changelog.d/1076.change @@ -0,0 +1 @@ +Suppression du filtrage de notification VoIP sur l'age de la notification. Ne fonctionnait pas correctement sur Tchap. \ No newline at end of file