memory: add Parameter "Chat history limit"
This commit is contained in:
parent
4c61bf8fad
commit
4f339272b7
1 changed files with 50 additions and 18 deletions
|
|
@ -265,10 +265,15 @@ class SqliteStorage(object):
|
|||
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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue