Permalink
Browse files

switched message sending to use the envelope idea from adapter base, …

…fixed reply's to have the correct user id
  • Loading branch information...
1 parent a407404 commit 61997a91adfcd3ea9e0fbfcc05bb93fb6b1e4806 Chris DaMour committed Mar 8, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/talker.coffee
View
@@ -6,13 +6,13 @@ net = require('net')
tls = require('tls')
class Talker extends Adapter
- send: (user, strings...) ->
+ send: (envelope, strings...) ->
strings.forEach (str) =>
- @bot.write user.room, {"type": "message", "content": str}
+ @bot.write envelope.room, {"type": "message", "content": str}
- reply: (user, strings...) ->
+ reply: (envelope, strings...) ->
strings.forEach (str) =>
- @send user, "@#{user.name} #{str}"
+ @send envelope, "@#{envelope.user.name} #{str}"
run: ->
self = @

0 comments on commit 61997a9

Please sign in to comment.