element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
GNU Affero General Public License v3.0
11.01k stars 1.96k forks source link

[Feature Request] Web/Desktop/Android/iOS - config.json parameter for matrix.to FQDN setting (self-hosted, non-federated) #7659

Closed BloodyIron closed 4 years ago

BloodyIron commented 5 years ago

Hi Folks,

Riot is absolutely fabulous, but I'm looking to implement it in an environment that requires all aspects to be self-hosted, and non-federated with the public space. This includes:

Many people ask why, well, because this implementation, requires only using the existing internal auth (AD/LDAP), and having total control over the infrastructure, end to end, to ensure service levels, and other such customization of things. Furthermore, to use the domain relevant to the target implementation, so not relying on the existence of the "matrix.to" domain.

Now, in my understanding, this kind of a setup out of the box will break the matrix.to functionality (which by the way is seriously rad).

From what I'm seeing, for me to get it "working" again, I need to adjust the following lines in the following components, and then recompile all the things (all versions of riot)

  1. https://github.com/matrix-org/matrix-react-sdk/blob/487e3cb98822313b827fbee72008c230042d7ad3/src/linkify-matrix.js#L187
  2. https://github.com/matrix-org/matrix-react-sdk/pull/2250/files/d802ee0fa2ce0a68986f848b9924ac352ededf54#diff-c1849c14ee26cff3674a5b7757cd42adL17

Now, I was hoping that it might be possible, instead, for the "matrix.to" host (FQDN) be moved to the config.json, so that anyone that wants to change from default value, whether it's web/desktop/android/ios, can change it, without having to ensure these two lines of code are updated every time a new build rolls out.

So, to put it another way, make it so the share (room/message/friend/group/etc) URLs instead of going to "matrix.to" go to "mydomain.whatever" (eg. domain.com), for the self-hosted, non-federated options.

Any chance this could be done please? :)

aaronraimist commented 4 years ago

Fixed by https://github.com/matrix-org/matrix-react-sdk/pull/3500

See permalinkPrefix in https://github.com/vector-im/riot-web/blob/develop/docs/config.md for documentation

BloodyIron commented 4 years ago

@aaronraimist WOOT! Thanks! :D