Closed otherdave closed 10 years ago
Hi, this thing is still a work in progress (lazy me...).
You are right, stanza as it is passed right now isn't the right thing to do. It should be abstracted to an object that is usable regardless of underlying protocol (e.g. irc, xmpp). Other than that, the way how you hooked them up is pretty much what I intend to do.
I don't mind you implementing this abstraction, if you want to. Though, I planned to do something about it this weekend. :)
If you want to use presence and other events in the meantime, take a look here for a hint. This way, with sleekxmpp under, you can register a handler for any of the events available.
This has been implemented
I'm working on a HipChat bot (but I'm using the XMPP backend of ERR) and after going crazy wondering why my bot's callbacks for on/offline and join/leave a room weren't being called, I noticed that the XMPP backend doesn't invoke them:
https://github.com/gbin/err/blob/master/errbot/backends/xmpp.py
lines 218 and on just pass. So I tried to hook them up by:
But it looks like "stanza" isn't the right thing to pass in to the callback? In my callback, I'm expecting to receive a Presence and when I call "get_real_name()" on it (for example), it's not found.
So this issue could either be a "please implement these" or if you are ok providing some guidance here, I don't mind hooking them up and submitting a pull request.