comparison src/core/xmpp.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 e9634d2e7b38
children 8ee9113d307b
comparison
equal deleted inserted replaced
511:62f7f2403093 512:862c0d6ab974
111 if e.name == "body": 111 if e.name == "body":
112 mess_type = message['type'] if message.hasAttribute('type') else 'normal' 112 mess_type = message['type'] if message.hasAttribute('type') else 'normal'
113 mess_body = e.children[0] if e.children else "" 113 mess_body = e.children[0] if e.children else ""
114 self.host.bridge.newMessage(message["from"], mess_body, mess_type, message['to'], profile=self.parent.profile) 114 self.host.bridge.newMessage(message["from"], mess_body, mess_type, message['to'], profile=self.parent.profile)
115 if not u"delay" in [elem.name for elem in message.elements()]: #we don't save delayed messages in history 115 if not u"delay" in [elem.name for elem in message.elements()]: #we don't save delayed messages in history
116 self.host.memory.addToHistory(jid.JID(message["from"]), jid.JID(message["to"]), mess_body, profile=self.parent.profile) 116 self.host.memory.addToHistory(jid.JID(message["from"]), jid.JID(message["to"]), mess_body, mess_type, profile=self.parent.profile)
117 break 117 break
118 118
119 class SatRosterProtocol(xmppim.RosterClientProtocol): 119 class SatRosterProtocol(xmppim.RosterClientProtocol):
120 120
121 def __init__(self, host): 121 def __init__(self, host):