chat: return username in Recipient for channels

pull/341/head
Demian 4 years ago
parent 309b5be317
commit 41c95795c0

@ -65,6 +65,9 @@ type ChatPhoto struct {
// Recipient returns chat ID (see Recipient interface).
func (c *Chat) Recipient() string {
if c.Type == ChatChannel && c.Username != "" {
return c.Username
}
return strconv.FormatInt(c.ID, 10)
}

Loading…
Cancel
Save