aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_thread.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-10-08 14:02:33 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:54 +0100
commitf5aae8a5a09c4c0c6ff456ced3edcc8731d264e4 (patch)
tree17bb200f64fafe89548343414e31e0a2f02b8333 /slack/slack_thread.py
parent359d508a31f3395ec3f004c723d185f474f63829 (diff)
downloadwee-slack-f5aae8a5a09c4c0c6ff456ced3edcc8731d264e4.tar.gz
Add unread buffers to hotlist on connect
Diffstat (limited to 'slack/slack_thread.py')
-rw-r--r--slack/slack_thread.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/slack/slack_thread.py b/slack/slack_thread.py
index 24bdc66..bc02c26 100644
--- a/slack/slack_thread.py
+++ b/slack/slack_thread.py
@@ -1,7 +1,7 @@
from __future__ import annotations
from itertools import chain
-from typing import TYPE_CHECKING, Dict, Mapping, Tuple
+from typing import TYPE_CHECKING, Dict, Mapping, Optional, Tuple
from slack.slack_buffer import SlackBuffer
from slack.slack_message import SlackMessage, SlackTs
@@ -31,7 +31,7 @@ class SlackThread(SlackBuffer):
return self.parent.replies
@property
- def last_read(self) -> SlackTs:
+ def last_read(self) -> Optional[SlackTs]:
return self.parent.last_read
async def get_name_and_buffer_props(self) -> Tuple[str, Dict[str, str]]:
@@ -98,7 +98,7 @@ class SlackThread(SlackBuffer):
return
# last_read can only be set if it exists (which is on threads you're subscribed to)
- if self.last_read == SlackTs("0.0"):
+ if self.last_read is None:
return
last_read_line_ts = self.last_read_line_ts()