xmppjs / hubot-xmpp

XMPP adapter for Hubot
181 stars 101 forks source link

crashes on private messages #4

Closed ivey closed 12 years ago

ivey commented 12 years ago

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)

ivey commented 12 years ago

Thanks Mark, can you do a version bump soon so this fix can get onto npm?

markstory commented 12 years ago

I was waiting to hear back on #3, but I think it's stalled out. I'll package a new release tonight.

markstory commented 12 years ago

0.0.5 is on npm now.