matrix-org / libera-chat

Support requests for the libera.chat IRC bridge hosted by matrix.org
7 stars 2 forks source link

Decouple channel discovery from relaying messages? #35

Open Consolatis opened 11 months ago

Consolatis commented 11 months ago

I looked a bit into how room aliases work in Matrix. Apparently all that is done by clients to resolve a room alias is requesting https://libera.ems.host/_matrix/client/v3/directory/room/%23libera-matrix:libera.chat

And to set the alias the same is done using a PUT request supplying a new room_id (docs).

This single PUT request could even be done with some ircd plugin (or IRC service like chanserv) which checks the IRC level permission of the requester vs the channel it is trying to set the Matrix room_id for.

That in turn would allow to completely decouple the relaying of messages from the way more important part (IMO) of having a canonical channel discovery from the Matrix side. E.g. either #chan:libera.chat is set to a default read-only room that only states that the channel is not available via Matrix (+ eventually a link to some docs how to set it up) or it would point to a Matrix room with an active relay controlled by the IRC channel community.

This seems way less error prone and controversial compared to a network wide relay. It doesn't solve the actual relay part but there are other options for that.