Merge pull request #133 from madsmtm/patch-1

Fixes #126
This commit is contained in:
Taehoon Kim
2017-05-05 12:54:51 -07:00
committed by GitHub
2 changed files with 2 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ Getting last messages sent
.. code-block:: python
last_messages = client.getThreadInfo(friend.uid,0)
last_messages = client.getThreadInfo(friend.uid, last_n=20)
last_messages.reverse() # messages come in reversed order
for message in last_messages:

View File

@@ -609,7 +609,7 @@ class Client(object):
# `start` doesn't matter, always returns from the last
# data['messages[{}][{}][offset]'.format(key, userID)] = start
data = {'messages[{}][{}][offset]'.format(key, userID): 0,
'messages[{}][{}][limit]'.format(key, userID): last_n,
'messages[{}][{}][limit]'.format(key, userID): last_n - 1,
'messages[{}][{}][timestamp]'.format(key, userID): now()}
r = self._post(MessagesURL, query=data)