I finally figured out how to add my matrix rooms to the matrix.org server's room dir for greater discoverability. It's not a great workflow, but here's how to do that safely, if you are on a different homeserver:
1. You'll need a matrix.org account, a throwaway one will do it.
2. Join the room you want to add with that account
3. Set the m.room.canonical_alias permission to custom level 10
4. grant your matrix.org user that custom level
5. Toggle the switch "Publish this room to the public in matrix.org's room directory?" in the room settings. (you need the permission mentioned above for that)
6. You can reset your matrix.org's power level back to 0
7. You can also leave the room again but note: there need's to be at least one matrix.org user in the room, otherwise the room dir entry will disappear again.
This also works for every other matrix server with a public room dir of course.
I.e. I also added it to the shivering-isles.com server's room directory.
@sheogorath also has an article about matrix room directories in general and how to add other's server room dirs to your client: https://shivering-isles.com/Using-the-matrix-room-directory
Why the custom powerlevel stuff?
Granting a user on another homeserver permissions in your room effectively also grants the same permissions to admins of that homeserver.
It's usually documented that you need moderator rights in a room to add that room to your homeservers directory, but synapse only requires the one specific canonicalalias permission, so via the custom PL requirement you can only grant this, and only temporarily.
This protects your even rouge server admins on other servers from interfering with your rooms moderation policy.
In light of the recent #freenode thing going on, this seems like a good thing to keep in mind.
@hubert Synapse checks that permission: https://github.com/matrix-org/synapse/blob/ed53bf314fee25d79d349beae409caf81a2d677f/synapse/api/auth.py#L543-L545
You can of course just give PL 50 that'll work, but if your threat model involves remote server admins (and I'd argue it always should; hello freenode 👋), that's actually quite dangerous.
chaos.social – a Fediverse instance for & by the Chaos community