matrix-chat: adjust group's room URL to the web client of the requesting user
Currently the group chat rooms are based on the current site URL (/stadt/chat/...
). This creates a few problems for users, that configured an external matrix ID for their grouprise account:
- the user is tempted to log into grouprise's matrix server
- this accidentally creates a matrix account based on the grouprise username, which may confuse other community peers
- the regular client (web, mobile or desktop) of the user is not used
Thus it would be nice to redirect users to a suitable URL based on their configured matrix ID.
The URL of a homeserver's web client can be retrieved by querying https://example.org/_matrix/client
- this URL returns a redirect to the web client (or 404, if none is configured in the matrix server). This URL could be used for assembling the URL for a specific room (probably most clients follow element's convention: /#/room/$ROOM_ID
).
But of course, it would be even better, if the local desktop environment could process the room URL instead in order to allow locally installed apps to jump to the given room. This could be done via the new matrix:
URL schema proposal (e.g. matrix:r/somewhere:example.org
). But probably there is currently a lack of client and desktop environment support for such a feature.
Thus I would recommend to implement the web client URL guessing approach described above for now.