From 24b2d522bf20c481f74639a7e4b43b6f71afce7d Mon Sep 17 00:00:00 2001 From: Patrick Connolly Date: Mon, 24 Feb 2014 12:27:52 -0500 Subject: [PATCH] Make smallest possible change to start using irc nick as uid. --- src/irc.coffee | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/irc.coffee b/src/irc.coffee index 6ddee37..f33229e 100644 --- a/src/irc.coffee +++ b/src/irc.coffee @@ -77,19 +77,19 @@ class IrcBot extends Adapter getUserFromName: (name) -> return @robot.brain.userForName(name) if @robot.brain?.userForName? + # Deprecated in 3.0.0 return @userForName name getUserFromId: (id) -> + # TODO: Add logic to convert object if name matches return @robot.brain.userForId(id) if @robot.brain?.userForId? + # Deprecated in 3.0.0 return @userForId id createUser: (channel, from) -> - user = @getUserFromName from - unless user? - id = new Date().getTime().toString() - user = @getUserFromId id - user.name = from + user = @getUserFromId from + user.name = from if channel.match(/^[&#]/) user.room = channel