Callbacks fixed for both button types.

pull/111/head
Ian Byrd 7 years ago
parent ea69d21d70
commit bdd5916b83
No known key found for this signature in database
GPG Key ID: 598F598CA3B8055F

@ -98,7 +98,7 @@ func (b *Bot) Handle(endpoint interface{}, handler interface{}) {
case string:
b.handlers[end] = handler
case CallbackEndpoint:
b.handlers["\f"+end.CallbackUnique()] = handler
b.handlers[end.CallbackUnique()] = handler
default:
panic("telebot: unsupported endpoint")
}

@ -70,7 +70,7 @@ type InlineButton struct {
// CallbackUnique returns InlineButto.Unique.
func (t *InlineButton) CallbackUnique() string {
return t.Unique
return "\f" + t.Unique
}
// CallbackUnique returns KeyboardButton.Text.

Loading…
Cancel
Save