mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-27 17:46:05 -05:00
Merge pull request #555 from ZogStriP/fix-email-notification-for-different-user-being-mentionned
FIX: Email notification for different user being mentioned
This commit is contained in:
commit
f10eafe2e1
2 changed files with 6 additions and 1 deletions
|
@ -65,7 +65,7 @@ module PrettyText
|
||||||
@mutex = Mutex.new
|
@mutex = Mutex.new
|
||||||
|
|
||||||
def self.mention_matcher
|
def self.mention_matcher
|
||||||
/(\@[a-zA-Z0-9\-]+)/
|
Regexp.new("(\@[a-zA-Z0-9_]{#{User.username_length.begin},#{User.username_length.end}})")
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.app_root
|
def self.app_root
|
||||||
|
|
|
@ -216,6 +216,11 @@ describe Post do
|
||||||
post.raw_mentions.should == ['finn']
|
post.raw_mentions.should == ['finn']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "handles underscore in username" do
|
||||||
|
post = Fabricate.build(:post, post_args.merge(raw: "@Jake @Finn @Jake_Old"))
|
||||||
|
post.raw_mentions.should == ['jake', 'finn', 'jake_old']
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
context "With a @mention limit of 1" do
|
context "With a @mention limit of 1" do
|
||||||
|
|
Loading…
Reference in a new issue