fix: phone privacy check no longer bypassed for contacts

applyPrivacy() had '!phoneAllowed && !isContact' which meant
contacts always saw the phone number regardless of the user's
privacy settings (e.g. 'Nobody'). Removed the isContact bypass
so privacy rules are enforced for everyone.
This commit is contained in:
wacpi 2026-07-22 04:02:19 +08:00 committed by onysd
parent 7349e0ae68
commit b9adf46826

View file

@ -614,7 +614,7 @@ func applyPrivacy(ctx context.Context, privacy PrivacyEvaluator, viewerUserID in
if err != nil {
return domain.User{}, err
}
if !phoneAllowed && !isContact {
if !phoneAllowed {
user.Phone = ""
}
statusAllowed, err := canSee(domain.PrivacyKeyStatusTimestamp)