def on_pubmsg(self, c, e): msg = Message(e.arguments[0]) msg.setFrom(e.target) msg.setTo(self.callback.jid) msg.setMuckNick(e.source.split('!')[0]) # FIXME find the real nick in the channel msg.setType('groupchat') self.callback.callback_message(self, msg)
def incoming_message(self, xmppmsg): msg = Message(xmppmsg['body']) msg.setFrom(xmppmsg['from'].bare) msg.setTo(xmppmsg['to'].bare) msg.setType(xmppmsg['type']) msg.setMuckNick(xmppmsg['mucnick']) msg.setDelayed(bool(xmppmsg['delay']._get_attr('stamp'))) # this is a bug in sleekxmpp it should be ['from'] self.callback_message(self.conn, msg)
def incoming_message(self, xmppmsg): """Callback for message events""" msg = Message(xmppmsg['body']) if 'html' in xmppmsg.keys(): msg.setHTML(xmppmsg['html']) msg.setFrom(xmppmsg['from'].full) msg.setTo(xmppmsg['to'].full) msg.setType(xmppmsg['type']) msg.setMuckNick(xmppmsg['mucnick']) msg.setDelayed(bool(xmppmsg['delay']._get_attr('stamp'))) # this is a bug in sleekxmpp it should be ['from'] self.callback_message(self.conn, msg)
def incoming_message(self, xmppmsg): """Callback for message events""" msg = Message(xmppmsg['body']) if 'html' in xmppmsg.keys(): msg.setHTML(xmppmsg['html']) msg.setFrom(xmppmsg['from'].full) msg.setTo(xmppmsg['to'].full) msg.setType(xmppmsg['type']) msg.setMuckNick(xmppmsg['mucnick']) msg.setDelayed(bool(xmppmsg['delay']._get_attr( 'stamp'))) # this is a bug in sleekxmpp it should be ['from'] self.callback_message(self.conn, msg)