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
This commit is contained in:
Goffi 2012-10-17 00:35:48 +02:00
commit fef2b1a620

View file

@ -610,9 +610,9 @@ class Memory:
@param name: Name of the profile"""
return self.params.deleteProfile(name)
def addToHistory(self, from_jid, to_jid, message, timestamp=None, profile="@NONE@"):
def addToHistory(self, from_jid, to_jid, message, _type='chat', timestamp=None, profile="@NONE@"):
assert(profile!="@NONE@")
return self.storage.addToHistory(from_jid, to_jid, message, timestamp, profile)
return self.storage.addToHistory(from_jid, to_jid, message, _type, timestamp, profile)
def getHistory(self, from_jid, to_jid, limit=0, between=True):
return self.storage.getHistory(jid.JID(from_jid), jid.JID(to_jid), limit, between)