Repository navigation
fix(profile): set_privacy_settings merges exceptions instead of opening privacy to everyone - #325
Merged
chigwell merged 1 commit intoOct 17, 2026
Conversation
…ng privacy to everyone Mirrors #13. The old implementation rebuilt the rules list from scratch: with allow_users empty it sent InputPrivacyValueAllowAll, silently replacing the account's main privacy choice (e.g. phone "nobody" became "everybody") and dropping every existing exception. Now the tool reads the current rules via account.getPrivacy, keeps the main choice and all exceptions, adds/updates the per-user allow/disallow exceptions, and refuses to touch anything when a user cannot be resolved, when the account itself is named, or when the server returns a rule this build cannot re-encode. Co-Authored-By: Claude Code <[email protected]>
chigwell
approved these changes
Oct 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before
set_privacy_settingsnever read the current rules: it built a fresh list and passed it toaccount.setPrivacy, which replaces the rules for the key. Withallow_usersempty it sentInputPrivacyValueAllowAll(), so a request liketurned an account whose phone visibility was Nobody into Everybody, and dropped every existing exception (user allow/disallow lists, contacts-only, close friends). Unresolvable users were silently skipped, and the tool still answered "Privacy settings for phone updated successfully."
After
account.getPrivacy, keeps the main choice and all existing exceptions, and merges the requested users into the per-user allow/disallow lists (a user named in one list leaves the other; exceptions first, main choice last — the order the official apps send).Error: Could not find a requested user; privacy settings were not changed.TypeErrorcompatibility branch.Tests
tests/test_privacy_settings.pypins the before/after cases: disallow-one under Nobody and under Everybody (main choice kept, exception first), existing exceptions kept and a user moved between lists, no change on unknown user, self, unsupported rule, and the empty call. Suite: 1243 passed (one run).Closes #324. Mirrors axisrow#13, already merged in my fork.
🤖 Generated with Claude Code