Merge pull request #721 from johnmn3/feature/slash-command-char-regex-#687

chat.suggestions: updated regex for switch from ! to / command char
This commit is contained in:
Jarrad 2017-01-14 09:39:05 +07:00 committed by GitHub
commit 42b14e71df
1 changed files with 1 additions and 1 deletions

View File

@ -41,7 +41,7 @@
(defn check-suggestion [db message]
(when-let [suggestion-text (when (string? message)
(re-matches #"^![^\s]+\s" message))]
(re-matches (re-pattern (str "^" chat-consts/command-char "[^\\s]+\\s")) message))]
(let [suggestion-text' (s/trim suggestion-text)]
(->> (get-commands db)
(filter #(= suggestion-text' (->> % second :name (str chat-consts/command-char))))