mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 17:06:10 -04:00
Fix reactivated users not being added to the user directory (#10782)
Co-authored-by: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com> Co-authored-by: reivilibre <olivier@librepush.net> Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
This commit is contained in:
parent
e584534403
commit
dcfd864970
3 changed files with 48 additions and 4 deletions
|
@ -255,13 +255,16 @@ class DeactivateAccountHandler(BaseHandler):
|
|||
Args:
|
||||
user_id: ID of user to be re-activated
|
||||
"""
|
||||
# Add the user to the directory, if necessary.
|
||||
user = UserID.from_string(user_id)
|
||||
profile = await self.store.get_profileinfo(user.localpart)
|
||||
await self.user_directory_handler.handle_local_profile_change(user_id, profile)
|
||||
|
||||
# Ensure the user is not marked as erased.
|
||||
await self.store.mark_user_not_erased(user_id)
|
||||
|
||||
# Mark the user as active.
|
||||
await self.store.set_user_deactivated_status(user_id, False)
|
||||
|
||||
# Add the user to the directory, if necessary. Note that
|
||||
# this must be done after the user is re-activated, because
|
||||
# deactivated users are excluded from the user directory.
|
||||
profile = await self.store.get_profileinfo(user.localpart)
|
||||
await self.user_directory_handler.handle_local_profile_change(user_id, profile)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue