2024-09-09 18:45:20 +10:00
|
|
|
import { useSpecVersions } from './useSpecVersions';
|
|
|
|
|
|
|
|
|
|
export const useMediaAuthentication = (): boolean => {
|
2024-09-14 23:24:06 +10:00
|
|
|
const { versions, unstable_features: unstableFeatures } = useSpecVersions();
|
2024-09-09 18:45:20 +10:00
|
|
|
|
|
|
|
|
// Media authentication is introduced in spec version 1.11
|
2024-09-14 23:24:06 +10:00
|
|
|
const authenticatedMedia =
|
|
|
|
|
unstableFeatures?.['org.matrix.msc3916.stable'] || versions.includes('v1.11');
|
2024-09-09 18:45:20 +10:00
|
|
|
|
|
|
|
|
return authenticatedMedia;
|
|
|
|
|
};
|