Don't priorizite faces
This commit is contained in:
parent
7f97c3144b
commit
0cf05628b7
1 changed files with 2 additions and 2 deletions
4
main.go
4
main.go
|
@ -97,7 +97,7 @@ func webhook(update tg.APIUpdate) {
|
||||||
captions = append(captions, fmt.Sprintf("cardmarket: € %s", card.Eur))
|
captions = append(captions, fmt.Sprintf("cardmarket: € %s", card.Eur))
|
||||||
}
|
}
|
||||||
face := card.ImageUris
|
face := card.ImageUris
|
||||||
if card.CardFaces != nil {
|
if card.ImageUris.Large == "" && card.CardFaces != nil {
|
||||||
face = card.CardFaces[0].ImageUris
|
face = card.CardFaces[0].ImageUris
|
||||||
}
|
}
|
||||||
photos[i] = tg.APIInlineQueryResultPhoto{
|
photos[i] = tg.APIInlineQueryResultPhoto{
|
||||||
|
@ -145,7 +145,7 @@ func webhook(update tg.APIUpdate) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errlist = append(errlist, cardname)
|
errlist = append(errlist, cardname)
|
||||||
} else {
|
} else {
|
||||||
if card.CardFaces != nil {
|
if card.ImageUris.Large == "" && card.CardFaces != nil {
|
||||||
for _, cardface := range card.CardFaces {
|
for _, cardface := range card.CardFaces {
|
||||||
cardmedia = append(cardmedia, tg.APIInputMediaPhoto{
|
cardmedia = append(cardmedia, tg.APIInputMediaPhoto{
|
||||||
Type: "photo",
|
Type: "photo",
|
||||||
|
|
Loading…
Reference in a new issue