all repos — telegram-bot-api @ 87b8e431a90523fa5c498f8406a34b11e6e03225

Golang bindings for the Telegram Bot API

Merge branch 'abdulgalimov-bugfix'
zhuharev kirill@zhuharev.ru
Thu, 09 Nov 2017 21:45:36 +0300
commit

87b8e431a90523fa5c498f8406a34b11e6e03225

parent

e6191af6795c37f1757d8ddba638ebb88e86c30b

3 files changed, 5 insertions(+), 1 deletions(-)

jump to
M bot.gobot.go

@@ -739,6 +739,9 @@ }

if &config.CanAddWebPagePreviews != nil { v.Add("can_add_web_page_previews", strconv.FormatBool(*config.CanAddWebPagePreviews)) } + if config.UntilDate != 0 { + v.Add("until_date", strconv.FormatInt(config.UntilDate, 10)) + } bot.debugLog("restrictChatMember", v, nil)
M types.gotypes.go

@@ -56,6 +56,7 @@ FirstName string `json:"first_name"`

LastName string `json:"last_name"` // optional UserName string `json:"username"` // optional LanguageCode string `json:"language_code"` // optional + IsBot bool `json:"is_bot"` // optional } // String displays a simple text version of a user.
M types_test.gotypes_test.go

@@ -8,7 +8,7 @@ "github.com/go-telegram-bot-api/telegram-bot-api"

) func TestUserStringWith(t *testing.T) { - user := tgbotapi.User{0, "Test", "Test", "", "en"} + user := tgbotapi.User{0, "Test", "Test", "", "en", false} if user.String() != "Test Test" { t.Fail()