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

Publish a different Matix room into own directory #11898

Closed
psychopathio opened this issue Feb 3, 2022 · 6 comments
Closed

Publish a different Matix room into own directory #11898

psychopathio opened this issue Feb 3, 2022 · 6 comments
Labels
X-Needs-Info This issue is blocked awaiting information from the reporter

Comments

@psychopathio
Copy link

I just found out that from the "Synapse Admin" docker I can publish any matrix room joined by a user on my Homeserver into my own directory to be discoverable by other users, but under settings publishing is blacked out.

If a user on my Homeserver joins a room, it becomes publishable by the "Synapse Admin" & only the "Synapse Admin" can unpublish it.
In room settings itself the option is blacked out whether it's enabled or disabled by the synapse admin.

@clokep
Copy link
Member

clokep commented Feb 3, 2022

I'm finding the above description a bit confusing. Can you describe what you mean a bit more? Is the issue that an administrator on your homeserver is able to publish rooms, but a regular user is not able to publish rooms?

Including a screenshot might also help.

@clokep clokep added the X-Needs-Info This issue is blocked awaiting information from the reporter label Feb 3, 2022
@psychopathio
Copy link
Author

while using the "Synapse Admin" docker I can publish a room that is joined by any user on my homeserver into my own homeserver directory, which i think is disabled by default.

@squahtx
Copy link
Contributor

squahtx commented Feb 14, 2022

I'm going to assume "Synapse Admin" refers to the https://github.com/Awesome-Technologies/synapse-admin tool.

I'm having trouble understanding what the issue is. What are you expecting to see?

@psychopathio
Copy link
Author

psychopathio commented Feb 18, 2022

If I joined a room via federation from another domain by default under settings, I cannot publish it on my own homeserver & other users won't be able to see it in my domain's homeserver.
https://upload.sykorp.com/XCmKbp
But if I use the docker "synapse admin" I can publish it into my own homeserver
https://upload.sykorp.com/bNAT8t
https://upload.sykorp.com/N9pxXx
https://upload.sykorp.com/ygP41t

the button is blacked out by default and cant be changed under "element" room settings.

not sure how to elaborate more :)

@squahtx
Copy link
Contributor

squahtx commented Feb 18, 2022

To be able to publish the room using Element Web, you need to have permissions to set the canonical alias and the room must not be invite-only. Synapse Admin bypasses the permissions checks because as a *homeserver* admin, you're allowed to do whatever you want with your own homeserver.

It's still unclear what options you're expecting to be enabled or disabled vs what you're seeing.

@reivilibre
Copy link
Contributor

I think the terminology here is very misleading.

The UI in Element is also notorious for being confusing; see element-hq/element-web#13077 (and potentially others).
I looked at Synapse Admin to figure out what 'Publish in room directory' does (https://github.com/Awesome-Technologies/synapse-admin/blob/95de50b925fc87224b7e722617e6397f8759bc3f/src/synapse/dataProvider.js#L254-L276).
It looks like it calls PUT /_matrix/client/r0/directory/list/room/:roomID. I notice the spec says that 'servers may choose to add additional permission checks'... Unfortunately that sounds like it makes it hard for a client to know if you're allowed to do it before actually doing it.
There's also an open issue, which I think is what you're describing: Element Web disables the option to publish to the room directory for irrelevant reasons (it requires you to have canonical_alias permission even though you don't actually need it) (element-hq/element-meta#287).
This is probably because of the above limitation (that the client can't know what the server's rules are).

As far as I can tell, this is primarily a client issue, but with an additional spec issue that the client can't know whether something is allowed before it does it (which I've opened as a spec bug on: matrix-org/matrix-spec#981).

Since there are issues in Element and in the spec for this, I will close this issue here since I think that addresses your problem and Synapse can't fix this without a spec change.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
X-Needs-Info This issue is blocked awaiting information from the reporter
Projects
None yet
Development

No branches or pull requests

4 participants