From 0cf05628b773ff66e23e6dda5c74a4e2831929a7 Mon Sep 17 00:00:00 2001 From: Hamcha Date: Thu, 13 Dec 2018 12:05:25 +0100 Subject: [PATCH] Don't priorizite faces --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index e053740..36448b6 100644 --- a/main.go +++ b/main.go @@ -97,7 +97,7 @@ func webhook(update tg.APIUpdate) { captions = append(captions, fmt.Sprintf("cardmarket: € %s", card.Eur)) } face := card.ImageUris - if card.CardFaces != nil { + if card.ImageUris.Large == "" && card.CardFaces != nil { face = card.CardFaces[0].ImageUris } photos[i] = tg.APIInlineQueryResultPhoto{ @@ -145,7 +145,7 @@ func webhook(update tg.APIUpdate) { if err != nil { errlist = append(errlist, cardname) } else { - if card.CardFaces != nil { + if card.ImageUris.Large == "" && card.CardFaces != nil { for _, cardface := range card.CardFaces { cardmedia = append(cardmedia, tg.APIInputMediaPhoto{ Type: "photo",