aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 90b56ac..be12cc9 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1445,7 +1445,8 @@ class SlackChannel(object):
def mark_read(self, ts=None, update_remote=True, force=False):
if not ts:
- ts = SlackTS()
+ msg_timestamps = self.sorted_message_keys()
+ ts = msg_timestamps[-1] if msg_timestamps else SlackTS()
if self.new_messages or force:
if self.channel_buffer:
w.buffer_set(self.channel_buffer, "unread", "")