Fix width/height of inline results
continuous-integration/drone/push Build is passing Details

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
1 changed files with 6 additions and 2 deletions

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{