lib/slack-ruby-bot/commands/base.rb in slack-ruby-bot-0.4.2 vs lib/slack-ruby-bot/commands/base.rb in slack-ruby-bot-0.4.3

- old
+ new

@@ -39,11 +39,11 @@ end end def self.command(*values, &block) values.each do |value| - match Regexp.new("^(?<bot>[\\w[:punct:]]*)[\\s]+(?<command>#{value})$", Regexp::IGNORECASE), &block - match Regexp.new("^(?<bot>[\\w[:punct:]]*)[\\s]+(?<command>#{value})[\\s]+(?<expression>.*)$", Regexp::IGNORECASE), &block + match Regexp.new("^(?<bot>[\\w[:punct:]@<>]*)[\\s]+(?<command>#{value})$", Regexp::IGNORECASE), &block + match Regexp.new("^(?<bot>[\\w[:punct:]@<>]*)[\\s]+(?<command>#{value})[\\s]+(?<expression>.*)$", Regexp::IGNORECASE), &block end end def self.invoke(client, data) self.finalize_routes!