a bit better email name inference

This commit is contained in:
Jeff Atwood 2016-01-26 16:39:02 -08:00
parent f71ae355ae
commit 0337964759
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ module UserNameSuggester
# When 'walter@white.com' take 'walter' # When 'walter@white.com' take 'walter'
name = Regexp.last_match[1] name = Regexp.last_match[1]
# When 'me@eviltrout.com' take 'eviltrout' # When 'me@eviltrout.com' take 'eviltrout'
name = Regexp.last_match[2] if ['i', 'me'].include?(name) name = Regexp.last_match[2] if ['i', 'me', 'info', 'support', 'admin', 'webmaster', 'hello', 'mail', 'office', 'contact', 'team'].include?(name)
end end
name name
end end