diff options
author | Brendan Abolivier <babolivier@matrix.org> | 2022-02-17 17:54:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-17 16:54:16 +0000 |
commit | 707049c6ff61193ffdfba909b4f17e9158c1d3e1 (patch) | |
tree | b0831e4f9066abf41b2b2e89c13d821d0907cd6c /synapse/rest/client/register.py | |
parent | Faster joins: parse msc3706 fields in send_join response (#12011) (diff) | |
download | synapse-707049c6ff61193ffdfba909b4f17e9158c1d3e1.tar.xz |
Allow modules to set a display name on registration (#12009)
Co-authored-by: Patrick Cloke <clokep@users.noreply.github.com>
Diffstat (limited to 'synapse/rest/client/register.py')
-rw-r--r-- | synapse/rest/client/register.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/rest/client/register.py b/synapse/rest/client/register.py index c965e2bda2..b8a5135e02 100644 --- a/synapse/rest/client/register.py +++ b/synapse/rest/client/register.py @@ -694,11 +694,18 @@ class RegisterRestServlet(RestServlet): session_id ) + display_name = await ( + self.password_auth_provider.get_displayname_for_registration( + auth_result, params + ) + ) + registered_user_id = await self.registration_handler.register_user( localpart=desired_username, password_hash=password_hash, guest_access_token=guest_access_token, threepid=threepid, + default_display_name=display_name, address=client_addr, user_agent_ips=entries, ) |