diff src/memory/sqlite.py @ 1222:e6e0ea4dc835

memory: add Parameter "Chat history limit"
author souliane <souliane@mailoo.org>
date Wed, 24 Sep 2014 13:49:43 +0200
parents 5e5661ab5c81
children f0c9b149ed99
line wrap: on
line diff
--- a/src/memory/sqlite.py	Fri Oct 03 12:43:59 2014 +0200
+++ b/src/memory/sqlite.py	Wed Sep 24 13:49:43 2014 +0200
@@ -265,10 +265,15 @@
         return d
 
     def getHistory(self, from_jid, to_jid, limit=None, between=True, profile=None):
-        """Store a new message in history
-        @param from_jid: source JID (full, or bare for catchall
-        @param to_jid: dest JID (full, or bare for catchall
-        @param size: maximum number of messages to get, or None for unlimited
+        """Retrieve messages in history
+        @param from_jid (JID): source JID (full, or bare for catchall)
+        @param to_jid (JID): dest JID (full, or bare for catchall)
+        @param limit (int): maximum number of messages to get:
+            - 0 for no message (returns the empty list)
+            - None for unlimited
+        @param between (bool): confound source and dest (ignore the direction)
+        @param profile (str): %(doc_profile)s
+        @return: list of tuple as in http://wiki.goffi.org/wiki/Bridge_API#getHistory
         """
         assert(profile)
         if limit == 0: