From 4f4aab21752a4b8b3f588ec3789447271b5dab10 Mon Sep 17 00:00:00 2001 From: Alexander Date: Tue, 7 Nov 2017 03:42:11 +0300 Subject: [PATCH] access to raw update json added --- bot.go | 1 + types.go | 1 + 2 files changed, 2 insertions(+) diff --git a/bot.go b/bot.go index 7d94a2c..9cd8125 100644 --- a/bot.go +++ b/bot.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 }) diff --git a/types.go b/types.go index 91875bb..356ba2f 100644 --- a/types.go +++ b/types.go @@ -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.