mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 05:04:57 +08:00
Use stable prefixes MSC3827 (#9092)
This commit is contained in:
parent
0357b4f0dc
commit
8379f5624e
@ -66,7 +66,7 @@ export default class LabsUserSettingsTab extends React.Component<{}, IState> {
|
|||||||
this.setState({ showJumpToDate });
|
this.setState({ showJumpToDate });
|
||||||
});
|
});
|
||||||
|
|
||||||
cli.doesServerSupportUnstableFeature("org.matrix.msc3827").then((showExploringPublicSpaces) => {
|
cli.doesServerSupportUnstableFeature("org.matrix.msc3827.stable").then((showExploringPublicSpaces) => {
|
||||||
this.setState({ showExploringPublicSpaces });
|
this.setState({ showExploringPublicSpaces });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -52,9 +52,9 @@ export const createSpace = async (
|
|||||||
createOpts: {
|
createOpts: {
|
||||||
name,
|
name,
|
||||||
preset: isPublic ? Preset.PublicChat : Preset.PrivateChat,
|
preset: isPublic ? Preset.PublicChat : Preset.PrivateChat,
|
||||||
visibility: (isPublic && await MatrixClientPeg.get().doesServerSupportUnstableFeature("org.matrix.msc3827"))
|
visibility: (
|
||||||
? Visibility.Public
|
isPublic && await MatrixClientPeg.get().doesServerSupportUnstableFeature("org.matrix.msc3827.stable")
|
||||||
: Visibility.Private,
|
) ? Visibility.Public : Visibility.Private,
|
||||||
power_level_content_override: {
|
power_level_content_override: {
|
||||||
// Only allow Admins to write to the timeline to prevent hidden sync spam
|
// Only allow Admins to write to the timeline to prevent hidden sync spam
|
||||||
events_default: 100,
|
events_default: 100,
|
||||||
|
@ -40,7 +40,7 @@ interface IProps {
|
|||||||
const SpaceSettingsVisibilityTab = ({ matrixClient: cli, space, closeSettingsFn }: IProps) => {
|
const SpaceSettingsVisibilityTab = ({ matrixClient: cli, space, closeSettingsFn }: IProps) => {
|
||||||
const [error, setError] = useState("");
|
const [error, setError] = useState("");
|
||||||
const serverSupportsExploringSpaces = useAsyncMemo<boolean>(async () => {
|
const serverSupportsExploringSpaces = useAsyncMemo<boolean>(async () => {
|
||||||
return cli.doesServerSupportUnstableFeature("org.matrix.msc3827");
|
return cli.doesServerSupportUnstableFeature("org.matrix.msc3827.stable");
|
||||||
}, [cli], false);
|
}, [cli], false);
|
||||||
|
|
||||||
const userId = cli.getUserId();
|
const userId = cli.getUserId();
|
||||||
|
@ -90,9 +90,9 @@ export const usePublicRoomDirectory = () => {
|
|||||||
|
|
||||||
if (query || roomTypes) {
|
if (query || roomTypes) {
|
||||||
opts.filter = {
|
opts.filter = {
|
||||||
"generic_search_term": query,
|
generic_search_term: query,
|
||||||
"org.matrix.msc3827.room_types": await MatrixClientPeg.get().doesServerSupportUnstableFeature(
|
room_types: await MatrixClientPeg.get().doesServerSupportUnstableFeature(
|
||||||
"org.matrix.msc3827",
|
"org.matrix.msc3827.stable",
|
||||||
) ? Array.from<RoomType | null>(roomTypes) : null,
|
) ? Array.from<RoomType | null>(roomTypes) : null,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user