userinfo: ignore non-applyMinPhoto avatars

This commit is contained in:
Tulir Asokan
2026-03-29 02:01:26 +02:00
parent 0727857ed0
commit dbe9be2102

View File

@@ -257,7 +257,9 @@ func (t *TelegramClient) wrapUserInfo(ctx context.Context, u tg.UserClass, ghost
photo, ok := user.Photo.(*tg.UserProfilePhoto)
if ok &&
(!user.Min || user.ApplyMinPhoto || oldMeta.IsMin()) &&
(!photo.Personal || t.main.Config.ContactAvatars) {
// Hack: check ApplyMinPhoto in addition to Personal, because some personalized avatars
// only have the ApplyMinPhoto flag and not Personal.
((!photo.Personal && user.ApplyMinPhoto) || t.main.Config.ContactAvatars) {
var err error
avatar, err = t.convertUserProfilePhoto(ctx, user, photo)
if err != nil {