From 292aa49ef71b8141dd4c079cb8f8e7a3fcf569f6 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 15 Jan 2025 12:36:05 +0100 Subject: [PATCH] fix(mobile-clients): Require supported mobile clients when E2EE calls are enforced Signed-off-by: Joas Schilling --- lib/Middleware/CanUseTalkMiddleware.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/Middleware/CanUseTalkMiddleware.php b/lib/Middleware/CanUseTalkMiddleware.php index fd01d305bb0..f9dcaf9eedc 100644 --- a/lib/Middleware/CanUseTalkMiddleware.php +++ b/lib/Middleware/CanUseTalkMiddleware.php @@ -36,9 +36,11 @@ class CanUseTalkMiddleware extends Middleware { public const TALK_DESKTOP_MIN_VERSION_RECORDING_CONSENT = '0.16.0'; public const TALK_ANDROID_MIN_VERSION = '15.0.0'; public const TALK_ANDROID_MIN_VERSION_RECORDING_CONSENT = '18.0.0'; + public const TALK_ANDROID_MIN_VERSION_E2EE_CALLS = '22.0.0'; public const TALK_IOS_MIN_VERSION = '15.0.0'; public const TALK_IOS_MIN_VERSION_RECORDING_CONSENT = '18.0.0'; + public const TALK_IOS_MIN_VERSION_E2EE_CALLS = '22.0.0'; public function __construct( @@ -139,14 +141,18 @@ protected function throwIfUnsupportedClientVersion(string $client, string $userA $versionRegex = IRequest::USER_AGENT_TALK_ANDROID; $minVersion = self::TALK_ANDROID_MIN_VERSION; - if ($this->talkConfig->recordingConsentRequired()) { + if ($this->talkConfig->isCallEndToEndEncryptionEnabled()) { + $minVersion = self::TALK_ANDROID_MIN_VERSION_E2EE_CALLS; + } elseif ($this->talkConfig->recordingConsentRequired()) { $minVersion = self::TALK_ANDROID_MIN_VERSION_RECORDING_CONSENT; } } elseif ($client === 'ios') { $versionRegex = IRequest::USER_AGENT_TALK_IOS; $minVersion = self::TALK_IOS_MIN_VERSION; - if ($this->talkConfig->recordingConsentRequired()) { + if ($this->talkConfig->isCallEndToEndEncryptionEnabled()) { + $minVersion = self::TALK_IOS_MIN_VERSION_E2EE_CALLS; + } elseif ($this->talkConfig->recordingConsentRequired()) { $minVersion = self::TALK_IOS_MIN_VERSION_RECORDING_CONSENT; } } else {