access to raw update json added

pull/131/head
Alexander 8 years ago
parent 6b5102fab5
commit 4f4aab2175
  1. 1
      bot.go
  2. 1
      types.go

@ -515,6 +515,7 @@ func (bot *BotAPI) ListenForWebhook(pattern string) UpdatesChannel {
var update Update
json.Unmarshal(bytes, &update)
update.RawUpdateJson = string(bytes)
ch <- update
})

@ -37,6 +37,7 @@ type Update struct {
CallbackQuery *CallbackQuery `json:"callback_query"`
ShippingQuery *ShippingQuery `json:"shipping_query"`
PreCheckoutQuery *PreCheckoutQuery `json:"pre_checkout_query"`
RawUpdateJson string
}
// UpdatesChannel is the channel for getting updates.