Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix issues with Xmpp adapter.

After recent refactorings, protocol adapters should be extending
Robot.Adapter. Update the name usage to point at the robot containing
the name.
  • Loading branch information...
commit d35b2bb9cec75c6bb8b0073d23877f9200735b3b 1 parent b72ebcf
@markstory markstory authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/adapters/xmpp.coffee
View
4 src/adapters/xmpp.coffee
@@ -1,7 +1,7 @@
Robot = require '../robot'
Xmpp = require 'node-xmpp'
-class XmppBot extends Robot
+class XmppBot extends Robot.Adapter
run: ->
options =
username: process.env.HUBOT_XMPP_USERNAME
@@ -34,7 +34,7 @@ class XmppBot extends Robot
# http://xmpp.org/extensions/xep-0045.html for XMPP chat standard
for room in @options.rooms
@client.send do =>
- el = new Xmpp.Element('presence', to: "#{room.jid}/#{@name}" )
+ el = new Xmpp.Element('presence', to: "#{room.jid}/#{@robot.name}" )
x = el.c('x', xmlns: 'http://jabber.org/protocol/muc' )
x.c('history', seconds: 1 ) # prevent the server from confusing us with old messages
# and it seems that servers don't reliably support maxchars

0 comments on commit d35b2bb

Please sign in to comment.
Something went wrong with that request. Please try again.