aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_buffer.py
diff options
context:
space:
mode:
Diffstat (limited to 'slack/slack_buffer.py')
-rw-r--r--slack/slack_buffer.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/slack/slack_buffer.py b/slack/slack_buffer.py
index 3da8aad..881e56d 100644
--- a/slack/slack_buffer.py
+++ b/slack/slack_buffer.py
@@ -178,7 +178,7 @@ class SlackBuffer(ABC):
@property
@abstractmethod
- def last_read(self) -> SlackTs:
+ def last_read(self) -> Optional[SlackTs]:
raise NotImplementedError()
@abstractmethod
@@ -253,7 +253,7 @@ class SlackBuffer(ABC):
async def print_message(self, message: SlackMessage):
rendered = await message.render(self.context)
- backlog = message.ts <= self.last_read
+ backlog = self.last_read is not None and message.ts <= self.last_read
tags = await message.tags(backlog)
weechat.prnt_date_tags(self.buffer_pointer, message.ts.major, tags, rendered)
if backlog: