all repos — telegram-bot-api @ f33a4eede12f454aad7e1bb5324e63b2697e6af5

Golang bindings for the Telegram Bot API

Add support for messages with disabled notifications.
Syfaro syfaro@foxpaw.in
Thu, 25 Feb 2016 07:47:20 -0600
commit

f33a4eede12f454aad7e1bb5324e63b2697e6af5

parent

36588c50f4e6c331eeeb4345889ff9fc1eb6e23e

1 files changed, 9 insertions(+), 4 deletions(-)

jump to
M configs.goconfigs.go

@@ -63,10 +63,11 @@ }

// BaseChat is base type for all chat config types. type BaseChat struct { - ChatID int // required - ChannelUsername string - ReplyToMessageID int - ReplyMarkup interface{} + ChatID int // required + ChannelUsername string + ReplyToMessageID int + ReplyMarkup interface{} + DisableNotification bool } // values returns url.Values representation of BaseChat

@@ -90,6 +91,8 @@ }

v.Add("reply_markup", string(data)) } + + v.Add("disable_notification", strconv.FormatBool(chat.DisableNotification)) return v, nil }

@@ -134,6 +137,8 @@

if file.FileSize > 0 { params["file_size"] = strconv.Itoa(file.FileSize) } + + params["disable_notification"] = strconv.FormatBool(file.DisableNotification) return params, nil }