a bit better email name inference
This commit is contained in:
parent
f71ae355ae
commit
0337964759
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue