I have a synapse homserver my.homeserver with ma1sd that uses our own small LDAP server as a backend. At our university we have another federated homeserver (other.homeserver) without ma1sd. I would like to include the user_directory of other.homeserver in the search results. It could be done using the EXEC backend, as follows.
Since the backend expects the localpart of the user_id and always appends the my.homeserver domain, ma1sd returns the following mxid in the search results:
@@user:other.homserver:my.homeserver
It would be great to have a configuration option to allow raw mxid output from exec scripts.
I currently made the following patch to 2.4.0, which works for our use case:
I have a synapse homserver
my.homeserver
with ma1sd that uses our own small LDAP server as a backend. At our university we have another federated homeserver (other.homeserver
) without ma1sd. I would like to include theuser_directory
ofother.homeserver
in the search results. It could be done using the EXEC backend, as follows.Configuration snippet
/etc/ma1sd/ma1sd.yaml
EXEC script
/opt/ma1sd-exec/other.homserver/user-directory.py
:The script queries
https://other.homserver/_matrix/client/r0/user_directory/search
and filters the results:Since the backend expects the localpart of the user_id and always appends the
my.homeserver
domain, ma1sd returns the following mxid in the search results:It would be great to have a configuration option to allow raw mxid output from exec scripts.
I currently made the following patch to 2.4.0, which works for our use case: