mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-01-12 21:19:30 -05:00
Merge pull request #2617 from matrix-org/matthew/auto-displayname
automatically set default displayname on register
This commit is contained in:
commit
275826f234
@ -180,9 +180,11 @@ class RegistrationStore(background_updates.BackgroundUpdateStore):
|
|||||||
)
|
)
|
||||||
|
|
||||||
if create_profile_with_localpart:
|
if create_profile_with_localpart:
|
||||||
|
# set a default displayname serverside to avoid ugly race
|
||||||
|
# between auto-joins and clients trying to set displaynames
|
||||||
txn.execute(
|
txn.execute(
|
||||||
"INSERT INTO profiles(user_id) VALUES (?)",
|
"INSERT INTO profiles(user_id, displayname) VALUES (?,?)",
|
||||||
(create_profile_with_localpart,)
|
(create_profile_with_localpart, create_profile_with_localpart)
|
||||||
)
|
)
|
||||||
|
|
||||||
self._invalidate_cache_and_stream(
|
self._invalidate_cache_and_stream(
|
||||||
|
Loading…
Reference in New Issue
Block a user