Important
🚧 This repo hosts a POC and is not meant to be used
- a user is part of a private federation in which, for some reason, has several accounts on different homeserver
- there's a 3rd party service linking the user and its MXID
- the user wants all the conversations of all his/her MXIDs to be synchronized
- if a message is read (or sent) with a MXID it should be marked read for every MXID
- A users creates an account on any of the federation servers
- At login, Element (or other clients), calls a service to select the right server to connect to, depending on a 3PId the code here
- In the interface the displayed name is preferred over the MXID
- Already implemented with Tchap
- Unique account with federated architecture
- If a server closes, accounts have to be migrated, users probably lose their messages
- Not obvious to implement for non-Element clients
- More complicated than centralized architecture with the constraints of the federated one
These requirements could be met with a Synapse module :
- when a user is invited to or creates a room, all its MXID are invited
- when a message is read, it should be marked as read for all the MXID
- The receipts part should not be modified like this, but it's just a POC 🤷🏻
For this POC a stubb directory has been created using grist. For CORS purpose, a synapse module acts as a proxy.
- docker / docker compose installed
- traefik and domain name configured
-
fill the .env file
TRAEFIK_NETWORK= DOMAIN= USER=("admin_matrix" "alice" "bob") SUB_DOMAIN_1=kiwi SUB_DOMAIN_2=litchi DIRECTORY_URL=https://something-that-returns-an-array-of-mxid?mxid=
DIRECTORY_URL : an url that, concatenated with a MXID, should return a json array of linked mxid.
-
start the stack
chmod +x *.sh ./init.sh docker-compose up -d
-
register users (configure in.env) in both servers (password=username, all admin : YOLO!)
./register-users.sh
-
if you want to reset the stack (erase database)
./reset-stack.sh
docker-compose logs etc... and go to your domain, login, create room, invite user and try it out!