From 111bf7658bb2a3b8248741b5ac53f2194621d3a0 Mon Sep 17 00:00:00 2001 From: igorcoding Date: Sat, 19 May 2018 19:22:14 +0300 Subject: [PATCH] Fix incorrect parse of channelprivate Chat type --- bot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.go b/bot.go index 269b8dc..eff063f 100644 --- a/bot.go +++ b/bot.go @@ -1056,7 +1056,7 @@ func (b *Bot) ChatByID(id string) (*Chat, error) { return nil, errors.Errorf("api error: %s", resp.Description) } - if resp.Result.Type == ChatChannel && resp.Result.Username != "" { + if resp.Result.Type == ChatChannel && resp.Result.Username == "" { //Channel is Private resp.Result.Type = ChatChannelPrivate }