mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 21:19:32 +08:00
FIX: Skip trigger match should be case insensitive.
https://meta.discourse.org/t/discobot-not-skipping-tutorial/68498
This commit is contained in:
@ -217,9 +217,7 @@ module DiscourseNarrativeBot
|
||||
def skip_track?
|
||||
if @is_pm_to_bot
|
||||
post_raw = @post.raw
|
||||
|
||||
post_raw.match(/^@#{self.discobot_user.username} #{self.class.skip_trigger}/i) ||
|
||||
post_raw.strip == self.class.skip_trigger
|
||||
post_raw.match(/((^@#{self.discobot_user.username} #{self.class.skip_trigger})|(^#{self.class.skip_trigger}$))/i)
|
||||
else
|
||||
false
|
||||
end
|
||||
|
Reference in New Issue
Block a user