From c1b308877d50ebeffc9ca5e5e7fae90108071529 Mon Sep 17 00:00:00 2001 From: wacpi Date: Wed, 22 Jul 2026 05:29:21 +0800 Subject: [PATCH] fix: remove phone bypass in addContact/acceptContact to respect privacy settings --- internal/rpc/contacts.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/internal/rpc/contacts.go b/internal/rpc/contacts.go index e77940b5..94344280 100644 --- a/internal/rpc/contacts.go +++ b/internal/rpc/contacts.go @@ -685,9 +685,6 @@ func (r *Router) onContactsAddContact(ctx context.Context, req *tg.ContactsAddCo peerUser := contact.User peerUser.Contact = true peerUser.Mutual = contact.Mutual || contact.User.Mutual - if contact.Phone != "" { - peerUser.Phone = contact.Phone - } if contact.FirstName != "" || contact.LastName != "" { peerUser.FirstName = contact.FirstName peerUser.LastName = contact.LastName @@ -742,9 +739,6 @@ func (r *Router) onContactsAcceptContact(ctx context.Context, id tg.InputUserCla peerUser := contact.User peerUser.Contact = true peerUser.Mutual = contact.Mutual || contact.User.Mutual - if contact.Phone != "" { - peerUser.Phone = contact.Phone - } if contact.FirstName != "" || contact.LastName != "" { peerUser.FirstName = contact.FirstName peerUser.LastName = contact.LastName