Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix reactivated users not being added to directory #10762

Conversation

DMRobertson
Copy link
Contributor

@DMRobertson DMRobertson commented Sep 4, 2021

Pulled this out of larger WIP changes because it's small and relatively isolated from the other changes.

The problem here is that handle_local_profile_change checks the DB to ensure the user isn't deactivated before upserting a directory entry.. So we need to reactivate them before calling this function, otherwise it'll do nothing.

Co-authored-by: Dirk Klimpel <5740567+dklimpel@users.noreply.github.com>
@DMRobertson DMRobertson requested a review from a team September 6, 2021 10:14
DMRobertson pushed a commit that referenced this pull request Sep 6, 2021
Copy link
Member

@clokep clokep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good overall! Thanks for adding tests!

synapse/handlers/deactivate_account.py Outdated Show resolved Hide resolved
tests/handlers/test_user_directory.py Show resolved Hide resolved
@clokep
Copy link
Member

clokep commented Sep 7, 2021

For cross-referencing, I'm assuming this was split out of #10761?

@DMRobertson
Copy link
Contributor Author

For cross-referencing, I'm assuming this was split out of #10761?

That's right, I spotted it as part of that work.

@DMRobertson DMRobertson requested a review from clokep September 8, 2021 12:50
Copy link
Member

@clokep clokep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@DMRobertson DMRobertson merged commit 401c1e8 into dmr/user-directory-nickname-leaks Sep 8, 2021
@DMRobertson DMRobertson deleted the dmr/add-reactivated-users-to-directory branch September 8, 2021 12:56
DMRobertson pushed a commit that referenced this pull request Sep 8, 2021
I meant to merge this to develop, but screwed my git-fu.

This reverts commit 401c1e8.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants