Skip to content

Commit

Permalink
Fix auth media check for dendrite (#1952)
Browse files Browse the repository at this point in the history
  • Loading branch information
kfiven authored Sep 14, 2024
1 parent c75e903 commit 4923b17
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/app/hooks/useMediaAuthentication.ts
Original file line number Diff line number Diff line change
@@ -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;
};

0 comments on commit 4923b17

Please sign in to comment.