markstory/hubot-xmpp — Issue #4: crashes on private messages
Author: ivey
Created: 2011-12-16 02:07:21+00:00
State: open

We have a hubot 1.11 bot with a manually hacked xmpp adapter that we're trying to upgrade to hubot 2.0. Regular chat works, but if you send a private message to the bot, it crashes. I'm not proficient enough with node/coffee to debug it, so I figured I'd post.

/home/lefay/lefaybot2/node_modules/hubot/node_modules/log/lib/log.js:149
var msg = args[0].replace(/%s/g, function(){
^
TypeError: Object Error: XML parse error has no method 'replace'
at EventEmitter.log (/home/lefay/lefaybot2/node_modules/hubot/node_modules/log/lib/log.js:149:25)
at EventEmitter.error (/home/lefay/lefaybot2/node_modules/hubot/node_modules/log/lib/log.js:202:10)
at XmppBot. (/home/lefay/lefaybot2/node_modules/hubot-xmpp/src/xmpp.coffee:50:32)
at Client. (/home/lefay/lefaybot2/node_modules/hubot-xmpp/src/xmpp.coffee:3:63)
at Client.emit (events.js:64:17)
at Client.error (/home/lefay/lefaybot2/node_modules/hubot-xmpp/node_modules/node-xmpp/lib/xmpp/connection.js:251:10)
at StreamParser. (/home/lefay/lefaybot2/node_modules/hubot-xmpp/node_modules/node-xmpp/lib/xmpp/connection.js:107:14)
at StreamParser.emit (events.js:64:17)
at StreamParser.error (/home/lefay/lefaybot2/node_modules/hubot-xmpp/node_modules/node-xmpp/lib/xmpp/stream_parser.js:94:10)
at [object Object]. (/home/lefay/lefaybot2/node_modules/hubot-xmpp/node_modules/node-xmpp/lib/xmpp/stream_parser.js:46:18)