aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2017-02-08 20:31:54 -0800
committerRyan Huber <rhuber@gmail.com>2017-02-08 20:31:54 -0800
commit369e7f2d26ac5a8f3604ad79a5b1fbceb0a8ccd1 (patch)
tree484f34779c19bd721889827f85f9ab67254e1870
parente411a9d01e1c6e67c2ad413342b0e52efab0d5ca (diff)
downloadwee-slack-369e7f2d26ac5a8f3604ad79a5b1fbceb0a8ccd1.tar.gz
fix read marker
-rw-r--r--wee_slack.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 0ee162b..9390363 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1205,6 +1205,7 @@ class SlackChannel(object):
del self.typing[user]
return typing
def mark_read(self, ts=None, update_remote=True, force=False):
+ dbg("called mark_read!", 5)
if not ts:
ts = SlackTS()
if self.new_messages or force:
@@ -1984,9 +1985,9 @@ def process_channel_marked(message_json, eventrouter, **kwargs):
complete
"""
channel = kwargs["channel"]
- ts = kwargs.get("ts", None)
+ ts = message_json.get("ts", None)
if ts:
- channel.mark_read(ts=ts, update_remote=False)
+ channel.mark_read(ts=ts, force=True, update_remote=False)
else:
dbg("tried to mark something weird {}".format(message_json))
def process_group_marked(message_json, eventrouter, **kwargs):