comparison src/core/sat_main.py @ 512:862c0d6ab974

core, bridge, quick_frontend: MUC private messages history management: - history now store message type - sqlite3 storage: fixed resource management in getHistory - bridge: added message type in getHistory return value - quick_chats: (ugly) hacks to manage private history filtering/nickname printing
author Goffi <goffi@goffi.org>
date Wed, 17 Oct 2012 00:35:48 +0200
parents 2e43c74815ad
children 8ee9113d307b
comparison
equal deleted inserted replaced
511:62f7f2403093 512:862c0d6ab974
497 if mess_data["subject"]: 497 if mess_data["subject"]:
498 message.addElement("subject", "jabber:client", subject) 498 message.addElement("subject", "jabber:client", subject)
499 message.addElement("body", "jabber:client", mess_data["message"]) 499 message.addElement("body", "jabber:client", 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"]), 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'], 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'], profile=profile) #We send back the message, so all clients are aware of it
505 505
506 506
507 def setPresence(self, to="", show="", priority = 0, statuses={}, profile_key='@DEFAULT@'): 507 def setPresence(self, to="", show="", priority = 0, statuses={}, profile_key='@DEFAULT@'):