mirror of
https://github.com/mautrix/telegram.git
synced 2026-05-17 07:25:46 +03:00
userinfo: save source_is_contact flag properly
This commit is contained in:
@@ -216,7 +216,8 @@ func (t *TelegramClient) wrapUserInfo(ctx context.Context, u tg.UserClass, ghost
|
||||
meta.IsBot = user.Bot
|
||||
meta.Deleted = user.Deleted
|
||||
meta.NotMin = true
|
||||
if meta.ContactSource == 0 || (!user.Contact && meta.SourceIsContact) {
|
||||
if meta.ContactSource == 0 || meta.ContactSource == t.telegramUserID || (!user.Contact && meta.SourceIsContact) {
|
||||
changed = changed || meta.ContactSource != t.telegramUserID || meta.SourceIsContact != user.Contact
|
||||
meta.ContactSource = t.telegramUserID
|
||||
meta.SourceIsContact = user.Contact
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user