Implement MSC3827: Filtering of /publicRooms
by room type (#8866)
This commit is contained in:
parent
18c21d77cd
commit
663bca559f
8 changed files with 96 additions and 21 deletions
|
@ -29,6 +29,7 @@ import { useLocalEcho } from "../../../hooks/useLocalEcho";
|
|||
import JoinRuleSettings from "../settings/JoinRuleSettings";
|
||||
import { useRoomState } from "../../../hooks/useRoomState";
|
||||
import SettingsFieldset from "../settings/SettingsFieldset";
|
||||
import { useAsyncMemo } from "../../../hooks/useAsyncMemo";
|
||||
|
||||
interface IProps {
|
||||
matrixClient: MatrixClient;
|
||||
|
@ -38,6 +39,9 @@ interface IProps {
|
|||
|
||||
const SpaceSettingsVisibilityTab = ({ matrixClient: cli, space, closeSettingsFn }: IProps) => {
|
||||
const [error, setError] = useState("");
|
||||
const serverSupportsExploringSpaces = useAsyncMemo<boolean>(async () => {
|
||||
return cli.doesServerSupportUnstableFeature("org.matrix.msc3827");
|
||||
}, [cli], false);
|
||||
|
||||
const userId = cli.getUserId();
|
||||
|
||||
|
@ -103,7 +107,7 @@ const SpaceSettingsVisibilityTab = ({ matrixClient: cli, space, closeSettingsFn
|
|||
canSetCanonicalAlias={canSetCanonical}
|
||||
canSetAliases={true}
|
||||
canonicalAliasEvent={canonicalAliasEv}
|
||||
hidePublishSetting={true}
|
||||
hidePublishSetting={!serverSupportsExploringSpaces}
|
||||
/>
|
||||
</>;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue