From 8379f5624e511a22c31a6b08dacc76cd79570aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 27 Jul 2022 20:10:37 +0200 Subject: [PATCH] Use stable prefixes MSC3827 (#9092) --- .../views/settings/tabs/user/LabsUserSettingsTab.tsx | 2 +- src/components/views/spaces/SpaceCreateMenu.tsx | 6 +++--- src/components/views/spaces/SpaceSettingsVisibilityTab.tsx | 2 +- src/hooks/usePublicRoomDirectory.ts | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/components/views/settings/tabs/user/LabsUserSettingsTab.tsx b/src/components/views/settings/tabs/user/LabsUserSettingsTab.tsx index 94f65d9de2..3ef729ed2f 100644 --- a/src/components/views/settings/tabs/user/LabsUserSettingsTab.tsx +++ b/src/components/views/settings/tabs/user/LabsUserSettingsTab.tsx @@ -66,7 +66,7 @@ export default class LabsUserSettingsTab extends React.Component<{}, IState> { this.setState({ showJumpToDate }); }); - cli.doesServerSupportUnstableFeature("org.matrix.msc3827").then((showExploringPublicSpaces) => { + cli.doesServerSupportUnstableFeature("org.matrix.msc3827.stable").then((showExploringPublicSpaces) => { this.setState({ showExploringPublicSpaces }); }); diff --git a/src/components/views/spaces/SpaceCreateMenu.tsx b/src/components/views/spaces/SpaceCreateMenu.tsx index 8e5bfb2cd7..fee5f2190f 100644 --- a/src/components/views/spaces/SpaceCreateMenu.tsx +++ b/src/components/views/spaces/SpaceCreateMenu.tsx @@ -52,9 +52,9 @@ export const createSpace = async ( createOpts: { name, preset: isPublic ? Preset.PublicChat : Preset.PrivateChat, - visibility: (isPublic && await MatrixClientPeg.get().doesServerSupportUnstableFeature("org.matrix.msc3827")) - ? Visibility.Public - : Visibility.Private, + visibility: ( + isPublic && await MatrixClientPeg.get().doesServerSupportUnstableFeature("org.matrix.msc3827.stable") + ) ? Visibility.Public : Visibility.Private, power_level_content_override: { // Only allow Admins to write to the timeline to prevent hidden sync spam events_default: 100, diff --git a/src/components/views/spaces/SpaceSettingsVisibilityTab.tsx b/src/components/views/spaces/SpaceSettingsVisibilityTab.tsx index a59ad39f62..e8a9b638f8 100644 --- a/src/components/views/spaces/SpaceSettingsVisibilityTab.tsx +++ b/src/components/views/spaces/SpaceSettingsVisibilityTab.tsx @@ -40,7 +40,7 @@ interface IProps { const SpaceSettingsVisibilityTab = ({ matrixClient: cli, space, closeSettingsFn }: IProps) => { const [error, setError] = useState(""); const serverSupportsExploringSpaces = useAsyncMemo(async () => { - return cli.doesServerSupportUnstableFeature("org.matrix.msc3827"); + return cli.doesServerSupportUnstableFeature("org.matrix.msc3827.stable"); }, [cli], false); const userId = cli.getUserId(); diff --git a/src/hooks/usePublicRoomDirectory.ts b/src/hooks/usePublicRoomDirectory.ts index 46941ec052..de848398d0 100644 --- a/src/hooks/usePublicRoomDirectory.ts +++ b/src/hooks/usePublicRoomDirectory.ts @@ -90,9 +90,9 @@ export const usePublicRoomDirectory = () => { if (query || roomTypes) { opts.filter = { - "generic_search_term": query, - "org.matrix.msc3827.room_types": await MatrixClientPeg.get().doesServerSupportUnstableFeature( - "org.matrix.msc3827", + generic_search_term: query, + room_types: await MatrixClientPeg.get().doesServerSupportUnstableFeature( + "org.matrix.msc3827.stable", ) ? Array.from(roomTypes) : null, }; }