Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Use stable prefixes MSC3827 (#9092)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonBrandner authored Jul 27, 2022
1 parent 0357b4f commit 8379f56
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
});

Expand Down
6 changes: 3 additions & 3 deletions src/components/views/spaces/SpaceCreateMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/spaces/SpaceSettingsVisibilityTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ interface IProps {
const SpaceSettingsVisibilityTab = ({ matrixClient: cli, space, closeSettingsFn }: IProps) => {
const [error, setError] = useState("");
const serverSupportsExploringSpaces = useAsyncMemo<boolean>(async () => {
return cli.doesServerSupportUnstableFeature("org.matrix.msc3827");
return cli.doesServerSupportUnstableFeature("org.matrix.msc3827.stable");
}, [cli], false);

const userId = cli.getUserId();
Expand Down
6 changes: 3 additions & 3 deletions src/hooks/usePublicRoomDirectory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<RoomType | null>(roomTypes) : null,
};
}
Expand Down

0 comments on commit 8379f56

Please sign in to comment.