aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_message.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_message.py
parent359d508a31f3395ec3f004c723d185f474f63829 (diff)
downloadwee-slack-f5aae8a5a09c4c0c6ff456ced3edcc8731d264e4.tar.gz
Add unread buffers to hotlist on connect
Diffstat (limited to 'slack/slack_message.py')
-rw-r--r--slack/slack_message.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/slack/slack_message.py b/slack/slack_message.py
index 2eb1bc7..0335c67 100644
--- a/slack/slack_message.py
+++ b/slack/slack_message.py
@@ -195,11 +195,9 @@ class SlackMessage:
return self.conversation.messages.get(self.thread_ts)
@property
- def last_read(self) -> SlackTs:
+ def last_read(self) -> Optional[SlackTs]:
if "last_read" in self._message_json:
return SlackTs(self._message_json["last_read"])
- else:
- return SlackTs("0.0")
@last_read.setter
def last_read(self, value: SlackTs):
@@ -213,6 +211,11 @@ class SlackMessage:
)
@property
+ def latest_reply(self) -> Optional[SlackTs]:
+ if "latest_reply" in self._message_json:
+ return SlackTs(self._message_json["latest_reply"])
+
+ @property
def is_bot_message(self) -> bool:
return (
"subtype" in self._message_json