From 210d561db52fee7ac4da110142ead8c244fc9e21 Mon Sep 17 00:00:00 2001 From: Rustam Gilyazov <16064414+rusq@users.noreply.github.com> Date: Sun, 7 Feb 2021 10:18:34 +1300 Subject: [PATCH] enable handling callbacks with Unique contaning "-" --- bot.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot.go b/bot.go index d8a4a8f..23b04fb 100644 --- a/bot.go +++ b/bot.go @@ -166,7 +166,7 @@ func (b *Bot) Handle(endpoint interface{}, handler interface{}) { var ( cmdRx = regexp.MustCompile(`^(/\w+)(@(\w+))?(\s|$)(.+)?`) - cbackRx = regexp.MustCompile(`^\f(\w+)(\|(.+))?$`) + cbackRx = regexp.MustCompile(`^\f([-\w]+)(\|(.+))?$`) ) // Start brings bot into motion by consuming incoming