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.IsBot = user.Bot
|
||||||
meta.Deleted = user.Deleted
|
meta.Deleted = user.Deleted
|
||||||
meta.NotMin = true
|
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.ContactSource = t.telegramUserID
|
||||||
meta.SourceIsContact = user.Contact
|
meta.SourceIsContact = user.Contact
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user