Skip to content

Commit

Permalink
Callbacks fixed for both button types.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Byrd committed Dec 10, 2017
1 parent ea69d21 commit bdd5916
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
Expand Down
2 changes: 1 addition & 1 deletion callbacks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit bdd5916

Please sign in to comment.