simple-xmpp / node-simple-xmpp

Simple High Level NodeJS XMPP Client
300 stars 90 forks source link

Couple of minor tweaks #48

Closed jackfranklin closed 10 years ago

jackfranklin commented 10 years ago

The first emits the data callback that node-xmpp passes when a new connection is confirmed as online. This is useful as we get info about the user's ID and JID, which can come in handy.

Secondly, I'm connecting via websockets and when that's the case, self.conn.connection.socket is undefined, so the lines that sort out keeping the connection alive error. I've wrapped them in a conditional which fixes the problem.

silverbucket commented 10 years ago

Apologies for the late reply. The changes look fine, though could you update the README in this pull request as well to document the fact that now the 'online' handler will receive some data as a parameter?

After that I will merge your changes.

jackfranklin commented 10 years ago

@silverbucket sorry I was slow to get back to you - just added to the README.

silverbucket commented 10 years ago

awesome, thanks @jackfranklin !