diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2020-06-19 16:17:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-19 16:17:13 +0100 |
commit | 53949a908fc785ab6c27b40343040df2462cd309 (patch) | |
tree | 23feb3417a2bc47d0d9c1ab3be13c383ea07a261 /scripts-dev/federation_client.py | |
parent | Performance improvements to marking expired users as inactive (#47) (diff) | |
download | synapse-53949a908fc785ab6c27b40343040df2462cd309.tar.xz |
Add a bulk user info endpoint and deprecate the old one (#46)
The current `/user/<user_id>/info` API was useful in that it could be used by any user to lookup whether another user was deactivate or expired. However, it was impractical as it only allowed for a single lookup at once. Clients trying to use this API were met with speed issues as they tried to query this information for all users in a room. This PR adds an equivalent CS and Federation API that takes a list of user IDs, and returning a mapping from user ID to info dictionary. Note that the federation in this PR was a bit trickier than in the original #12 as we can no longer use a federation query, as those don't allow for JSON bodies - which we require to pass a list of user IDs. Instead we do the whole thing of adding a method to transport/client and transport/server. This PR also adds unittests. The earlier PR used Sytest, presumably for testing across federation, but as this is Synapse-specific that felt a little gross. Unit tests for the deprecated endpoint have not been added.
Diffstat (limited to 'scripts-dev/federation_client.py')
0 files changed, 0 insertions, 0 deletions