From 4923b17ad6b247bb2d2298d6bd08101fd48d8e09 Mon Sep 17 00:00:00 2001 From: Krishan <33421343+kfiven@users.noreply.github.com> Date: Sat, 14 Sep 2024 23:24:06 +1000 Subject: [PATCH] Fix auth media check for dendrite (#1952) --- src/app/hooks/useMediaAuthentication.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/hooks/useMediaAuthentication.ts b/src/app/hooks/useMediaAuthentication.ts index 04b25e19..6e4d06aa 100644 --- a/src/app/hooks/useMediaAuthentication.ts +++ b/src/app/hooks/useMediaAuthentication.ts @@ -1,10 +1,11 @@ import { useSpecVersions } from './useSpecVersions'; export const useMediaAuthentication = (): boolean => { - const { versions } = useSpecVersions(); + const { versions, unstable_features: unstableFeatures } = useSpecVersions(); // Media authentication is introduced in spec version 1.11 - const authenticatedMedia = versions.includes('v1.11'); + const authenticatedMedia = + unstableFeatures?.['org.matrix.msc3916.stable'] || versions.includes('v1.11'); return authenticatedMedia; };