Skip to content

Commit

Permalink
fix some trivial issue in otsuka:master branch (sciyoshi#112 )
Browse files Browse the repository at this point in the history
  • Loading branch information
cat-in-136 committed Sep 4, 2018
1 parent 3ea7006 commit 4bd326f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/redmine_slack/listener.rb
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ def extract_usernames text = ''
text = ''
end

text.scan(/@[a-z0-9][a-z0-9_\-.]*/).uniq.each do |username|
text.scan(/@[a-z0-9][a-z0-9_\-]*/).uniq.each do |username|
# Remove the leading @
username.slice!(0)
end
Expand Down Expand Up @@ -399,6 +399,6 @@ def build_mentions(assignee_user, text, project_id)

# Slack usernames to be mentioned
slack_usernames = slack_usernames.uniq.map { |name| '@' + name }
slack_usernames.present? ? "\n" + slack_usernames.join(' ') : nil
slack_usernames.present? ? "\nTo: " + slack_usernames.join(' ') : nil
end
end

0 comments on commit 4bd326f

Please sign in to comment.