Fix width/height of inline results
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
e7b62434a2
commit
05c759e17b
1 changed files with 6 additions and 2 deletions
8
main.go
8
main.go
|
@ -101,12 +101,16 @@ func webhook(update tg.APIUpdate) {
|
||||||
ThumbURL: face,
|
ThumbURL: face,
|
||||||
Title: card.FullName,
|
Title: card.FullName,
|
||||||
Caption: caption,
|
Caption: caption,
|
||||||
Width: 672,
|
Width: 344,
|
||||||
Height: 936,
|
Height: 480,
|
||||||
ReplyMarkup: &tg.APIInlineKeyboardMarkup{
|
ReplyMarkup: &tg.APIInlineKeyboardMarkup{
|
||||||
InlineKeyboard: [][]tg.APIInlineKeyboardButton{buttons},
|
InlineKeyboard: [][]tg.APIInlineKeyboardButton{buttons},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
// Flip width/height for problems
|
||||||
|
if card.Type == "Problem" {
|
||||||
|
photos[i].Width, photos[i].Height = photos[i].Height, photos[i].Width
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
err = api.AnswerInlineQuery(tg.InlineQueryResponse{
|
err = api.AnswerInlineQuery(tg.InlineQueryResponse{
|
||||||
|
|
Loading…
Reference in a new issue