From 265522cb1740350a6452556d9eefba2ef3430a77 Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Wed, 16 Nov 2016 16:16:41 -0500 Subject: [PATCH] Set "oldest" timestamp when reading IMs Otherwise we will send all messages in the thread Signed-off-by: Anna Schumaker --- slack/im.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slack/im.py b/slack/im.py index 39bcb43..d3458ab 100644 --- a/slack/im.py +++ b/slack/im.py @@ -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"]