Fix width/height of inline results
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Hamcha 2019-08-26 12:44:40 +02:00
parent e7b62434a2
commit 05c759e17b
Signed by: hamcha
GPG key ID: 44AD3571EB09A39E

View file

@ -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{