Add support for messages with disabled notifications.
Syfaro syfaro@foxpaw.in
Thu, 25 Feb 2016 07:47:20 -0600
1 files changed,
9 insertions(+),
4 deletions(-)
jump to
M
configs.go
→
configs.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 }