Set "oldest" timestamp when reading IMs

Otherwise we will send all messages in the thread

Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
Anna Schumaker 2016-11-16 16:16:41 -05:00
parent 1d6764564d
commit 265522cb17
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ class IM(threads.Thread):
def history(im, timestamp):
ret = api.call("im.history", token = auth.token(), channel = im)
ret = api.call("im.history", token = auth.token(), channel = im, oldest = timestamp)
if ret["ok"] == False:
return None
return ret["messages"]