The matrix specification has a link scheme that does not require going through matrix.to: https://spec.matrix.org/latest/appendices/#matrix-uri-scheme
The URI scheme is also registered with the IANA, so clients SHOULD support it: https://www.iana.org/assignments/uri-schemes/prov/matrix
Some clients do not actually register a link handler for the matrix URI, particularly Element, so copying the room ID as a fallback would probably also be required so that people can insert this into their clients.
I think it's worth not going through a central authority when linking to federated and decentralized chatrooms (matrix.to has been blocked in some countries, for example)
The matrix specification has a link scheme that does not require going through matrix.to: https://spec.matrix.org/latest/appendices/#matrix-uri-scheme The URI scheme is also registered with the IANA, so clients SHOULD support it: https://www.iana.org/assignments/uri-schemes/prov/matrix Some clients do not actually register a link handler for the matrix URI, particularly Element, so copying the room ID as a fallback would probably also be required so that people can insert this into their clients.
I think it's worth not going through a central authority when linking to federated and decentralized chatrooms (matrix.to has been blocked in some countries, for example)