I've to send xmpp based chat client (hipchat) and I'm using xmpp.py for this purpose. For now, I'm trying to send message from shell. Following are the statements that I'm executing from the shell:
>>> import xmpp
>>> jid = xmpp.protocol.JID('99999_9999@chat.hipchat.com')
>>> cl=xmpp.Client(jid.getDomain(),debug=[])
>>> cl.connect()
'tls'
>>> cl.auth(jid.getNode(),'password')
'sasl'
>>> cl.send(xmpp.protocol.Message('99999_9999@chat.hipchat.com','hey!'))
'3'
I'm using the same jabber id for authentication and as a receiver. I'm also online in chat room but I don't get any message. What's missing?
I was missing the typ
parameter. Adding it with value chat
solved the problem:
cl.send(xmpp.protocol.Message('99999_9999@chat.hipchat.com','hey!', typ='chat'))