From 2dce08bab1006abe27d1931f4ba74a7fb693873c Mon Sep 17 00:00:00 2001 From: Krille Date: Tue, 20 Aug 2024 12:53:41 +0200 Subject: [PATCH] refactor: Also use authenticated media if unstable features claim support --- lib/src/client.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/src/client.dart b/lib/src/client.dart index 3e9065a4..1db5e395 100644 --- a/lib/src/client.dart +++ b/lib/src/client.dart @@ -1164,11 +1164,11 @@ class Client extends MatrixApi { GetVersionsResponse? _versionsCache; Future authenticatedMediaSupported() async { - _versionsCache ??= await getVersions(); - return _versionsCache?.versions.any( + final versionsResponse = _versionsCache ??= await getVersions(); + return versionsResponse.versions.any( (v) => isVersionGreaterThanOrEqualTo(v, 'v1.11'), - ) ?? - false; + ) || + versionsResponse.unstableFeatures?['org.matrix.msc3916.stable'] == true; } final _serverConfigCache = AsyncCache(const Duration(hours: 1));