Fix incorrect parse of channelprivate Chat type

pull/141/head
igorcoding 6 years ago committed by GitHub
parent ab26c41a13
commit 111bf7658b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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
}

Loading…
Cancel
Save