comparison src/core/sat_main.py @ 536:a31abb97310d

core, plugins: fixed bad namespace in stanza creation
author Goffi <goffi@goffi.org>
date Thu, 01 Nov 2012 22:41:39 +0100
parents 8ee9113d307b
children 2c4016921403
comparison
equal deleted inserted replaced
535:790be337cc41 536:a31abb97310d
488 488
489 if not self.trigger.point("sendMessage", mess_data, profile): 489 if not self.trigger.point("sendMessage", mess_data, profile):
490 return 490 return
491 491
492 debug(_("Sending jabber message of type [%(type)s] to %(to)s...") % {"type": mess_data["type"], "to": to}) 492 debug(_("Sending jabber message of type [%(type)s] to %(to)s...") % {"type": mess_data["type"], "to": to})
493 message = domish.Element(('jabber:client','message')) 493 message = domish.Element((None,'message'))
494 message["to"] = mess_data["to"].full() 494 message["to"] = mess_data["to"].full()
495 message["from"] = current_jid.full() 495 message["from"] = current_jid.full()
496 message["type"] = mess_data["type"] 496 message["type"] = mess_data["type"]
497 if mess_data["subject"]: 497 if mess_data["subject"]:
498 message.addElement("subject", "jabber:client", subject) 498 message.addElement("subject", None, subject)
499 message.addElement("body", "jabber:client", mess_data["message"]) 499 message.addElement("body", None, mess_data["message"])
500 client.xmlstream.send(message) 500 client.xmlstream.send(message)
501 if mess_data["type"]!="groupchat": 501 if mess_data["type"]!="groupchat":
502 self.memory.addToHistory(current_jid, jid.JID(to), unicode(mess_data["message"]), unicode(mess_data["type"]), profile=profile) #we don't add groupchat message to history, as we get them back 502 self.memory.addToHistory(current_jid, jid.JID(to), unicode(mess_data["message"]), unicode(mess_data["type"]), profile=profile) #we don't add groupchat message to history, as we get them back
503 #and they will be added then 503 #and they will be added then
504 self.bridge.newMessage(message['from'], unicode(mess_data["message"]), mess_type=mess_data["type"], to_jid=message['to'], extra={}, profile=profile) #We send back the message, so all clients are aware of it 504 self.bridge.newMessage(message['from'], unicode(mess_data["message"]), mess_type=mess_data["type"], to_jid=message['to'], extra={}, profile=profile) #We send back the message, so all clients are aware of it