xmppjs / hubot-xmpp

XMPP adapter for Hubot
180 stars 103 forks source link

`robot.enter` not working #3

Closed incanus closed 11 years ago

incanus commented 12 years ago

I've tried to figure out in the guts of readPresence why this might be the case, but no dice yet. Any way to get robot.enter to actually fire when someone enters a room?

markstory commented 12 years ago

Looks like I've totally forgotten to finish that functionality off :( I'll get started on it.

markstory commented 12 years ago

I think things should be working now. If you could give it a try, I'll close the issue and package a new release.

incanus commented 12 years ago

Thanks, @markstory. I turned on debug logging (running this on Heroku) and it looks like just the rooms are showing availability, but it appears that a line is seen for each user in the room.

For example, I have a room called data with three people in it, counting Hubot, and I see this in the logs when it is joined:

2011-12-15T00:56:46+00:00 app[app.1]: [Thu, 15 Dec 2011 00:56:46 GMT] DEBUG Availability received for data
2011-12-15T00:56:46+00:00 app[app.1]: [Thu, 15 Dec 2011 00:56:46 GMT] DEBUG Availability received for data
2011-12-15T00:56:46+00:00 app[app.1]: [Thu, 15 Dec 2011 00:56:46 GMT] DEBUG Availability received for data

I'll do some digging, but maybe it's parsing the presence stanzas incorrectly.

markstory commented 12 years ago

Yeah that seems strange, I thought I changed that. I did my testing against ejabberd though.

incanus commented 12 years ago

This is ejabberd as well. I'm still trying to test, but having a tough time getting my debugging fork of hubot-xmpp to work in either Heroku or locally :-/

markstory commented 12 years ago

I usually create a standalone bot, and then clone hubot-xmpp into the node_modules directory. Then I can work with development versions of the adapter.

incanus commented 12 years ago

Yeah, the problem isn't necessarily getting the code in place, but rather that locally, my bot fails to connect to our XMPP server with a crash for some reason (still working on that -- works for shell & IRC) and on Heroku, I can't get it to rebuild hubot-xmpp from either my GitHub or a hosted tarball specified in the package.json in order to get some debug logging in there. And I just haven't had time to resolve it yet.

incanus commented 12 years ago

This is working now for me, but I see an issue where when the bot enters the room, it thinks everyone else has as well since they are new and triggers mass robot.enter commands.

markstory commented 12 years ago

That was happening for me as well at one point. I've attempted to fix that by ignore presence messages until the bot has heard its own presence message. Its probably not fool proof in all situations, but on the jabber networks I have access to it works. I'm open to any changes that make it work on other networks/servers.

markstory commented 11 years ago

Closing as there haven't been any updates in ~1 year, so I can only assume things are working now.