diff --git a/bot.go b/bot.go index 35b4641..da2f459 100644 --- a/bot.go +++ b/bot.go @@ -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") } diff --git a/callbacks.go b/callbacks.go index f8d5e7e..b92349c 100644 --- a/callbacks.go +++ b/callbacks.go @@ -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.