From e69af9405aa6140121ca4d68314c180a6838d265 Mon Sep 17 00:00:00 2001 From: texuf Date: Sat, 16 Jul 2022 17:41:58 -0700 Subject: [PATCH] /hierarchy - return public and knockable rooms for authed users When requesting the room hierarchy with an authenticated user, return public and knockable rooms. According to the spec, https://github.com/matrix-org/matrix-spec-proposals/blob/main/proposals/2946-spaces-summary.md ``` Any child room that the user is joined or is potentially joinable is included in the response. ``` This is currently not the case. See discussion here: https://matrix.to/#/!NasysSDfxKxZBzJJoE:matrix.org/$t2Csj-6y1PVsn8GOnFZfXzeQW13NfqvrFCxB-XI_uhA?via=matrix.org&via=libera.chat&via=element.io and here: https://matrix.to/#/!NasysSDfxKxZBzJJoE:matrix.org/$EHp1x1DY7tnYZtx_PVEb-sKB9lmJajqHx2uGlhrRh6k?via=matrix.org&via=libera.chat&via=element.io Test Plan: create and register clients bob and alice have bob create a public space have bob create a public room parented to the space have alice join the space(room) have alice sync the space expect alice to see two rooms in the space hierarchy, the space and the child room --- .github/workflows/dendrite.yml | 8 -------- setup/mscs/msc2946/msc2946.go | 3 +++ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dendrite.yml b/.github/workflows/dendrite.yml index ee969ec8b..f8019b3ea 100644 --- a/.github/workflows/dendrite.yml +++ b/.github/workflows/dendrite.yml @@ -132,11 +132,7 @@ jobs: strategy: fail-fast: false matrix: -<<<<<<< HEAD go: ["1.18", "1.19"] -======= - go: ["1.18"] ->>>>>>> 698369f5 (merge latest changes from dendrite main (#15)) goos: ["linux"] goarch: ["amd64", "386"] steps: @@ -170,11 +166,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: -<<<<<<< HEAD go: ["1.18", "1.19"] -======= - go: ["1.18"] ->>>>>>> 698369f5 (merge latest changes from dendrite main (#15)) goos: ["windows"] goarch: ["amd64"] steps: diff --git a/setup/mscs/msc2946/msc2946.go b/setup/mscs/msc2946/msc2946.go index a92a16a27..015ba4516 100644 --- a/setup/mscs/msc2946/msc2946.go +++ b/setup/mscs/msc2946/msc2946.go @@ -45,6 +45,9 @@ const ( ConstCreateEventContentValueSpace = "m.space" ConstSpaceChildEventType = "m.space.child" ConstSpaceParentEventType = "m.space.parent" + ConstJoinRulePublic = "public" + ConstJoinRuleKnock = "knock" + ConstJoinRuleRestricted = "restricted" ) type MSC2946ClientResponse struct {