Skip to content

Commit 7a9a93c

Browse files
committedApr 12, 2012
Fall back to email when first name isn't present in the /me command
1 parent 05c0fbe commit 7a9a93c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎app/assets/javascripts/backbone/plugins/me_announce.js.coffee

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ class Kandan.Plugins.MeAnnounce
33
@regex: /^/me /
44

55
@init: ()->
6-
Kandan.Modifiers.register @regex, (message, state)=>
6+
Kandan.Modifiers.register @regex, (message, state) =>
7+
actor = message.user.first_name || message.user.email
78
message.content = message.content.replace @regex, "#{message.user.first_name} "
89
return Kandan.Helpers.Activities.build_from_base_template(message)
910

0 commit comments

Comments
 (0)
Please sign in to comment.