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/module_api | |
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/module_api')
-rw-r--r-- | synapse/module_api/__init__.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/module_api/__init__.py b/synapse/module_api/__init__.py index d4fca36923..8a17b912d3 100644 --- a/synapse/module_api/__init__.py +++ b/synapse/module_api/__init__.py @@ -70,6 +70,7 @@ from synapse.handlers.account_validity import ( from synapse.handlers.auth import ( CHECK_3PID_AUTH_CALLBACK, CHECK_AUTH_CALLBACK, + GET_DISPLAYNAME_FOR_REGISTRATION_CALLBACK, GET_USERNAME_FOR_REGISTRATION_CALLBACK, IS_3PID_ALLOWED_CALLBACK, ON_LOGGED_OUT_CALLBACK, @@ -317,6 +318,9 @@ class ModuleApi: get_username_for_registration: Optional[ GET_USERNAME_FOR_REGISTRATION_CALLBACK ] = None, + get_displayname_for_registration: Optional[ + GET_DISPLAYNAME_FOR_REGISTRATION_CALLBACK + ] = None, ) -> None: """Registers callbacks for password auth provider capabilities. @@ -328,6 +332,7 @@ class ModuleApi: is_3pid_allowed=is_3pid_allowed, auth_checkers=auth_checkers, get_username_for_registration=get_username_for_registration, + get_displayname_for_registration=get_displayname_for_registration, ) def register_background_update_controller_callbacks( |