well-known: set matrix/client

This commit is contained in:
Girish Ramakrishnan
2021-07-29 11:59:11 -07:00
parent e3555236d4
commit 060737b0d5
+9
View File
@@ -324,6 +324,15 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
var wellKnown = {};
if ($scope.domainConfigure.matrixHostname) {
wellKnown['matrix/server'] = JSON.stringify({ 'm.server': $scope.domainConfigure.matrixHostname });
// https://matrix.org/docs/spec/client_server/latest#get-well-known-matrix-client
wellKnown['matrix/client'] = JSON.stringify({
'm.homeserver': {
'base_url': 'https://' + $scope.domainConfigure.matrixHostname
},
'm.identity_server': {
'base_url': 'https://vector.im'
}
});
}
if ($scope.domainConfigure.mastodonHostname) {
wellKnown['host-meta'] = '<?xml version="1.0" encoding="UTF-8"?>\n'