diff src/memory/memory.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 f98bef71a918
children 2c4016921403
line wrap: on
line diff
--- a/src/memory/memory.py	Tue Oct 16 01:22:40 2012 +0200
+++ b/src/memory/memory.py	Wed Oct 17 00:35:48 2012 +0200
@@ -610,9 +610,9 @@
         @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)