Inline mode fix.

pull/108/head
Ian Byrd 7 years ago
parent 47524101d5
commit 77d1ba9eb1

@ -682,6 +682,8 @@ func (b *Bot) Notify(recipient Recipient, action ChatAction) error {
// be responded to once, subsequent attempts to respond to the same query
// will result in an error.
func (b *Bot) Answer(query *Query, response *QueryResponse) error {
response.QueryID = query.ID
respJSON, err := b.Raw("answerInlineQuery", response)
if err != nil {
return err

@ -101,7 +101,7 @@ func (results Results) MarshalJSON() ([]byte, error) {
}
}
return json.Marshal(results)
return json.Marshal([]Result(results))
}
func inferIQR(result Result) error {

@ -9,7 +9,7 @@ type ResultBase struct {
// Ignore. This field gets set automatically.
Type string `json:"type",hash:"ignore"`
// Content of the message to be sent.
// Optional. Content of the message to be sent.
Content *InputMessageContent `json:"input_message_content,omitempty"`
// Optional. Inline keyboard attached to the message.

Loading…
Cancel
Save