diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2019-06-11 18:33:42 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2019-06-11 18:39:05 +0200 |
commit | c60c1870e7e64a929ecfb9f605e1c14f7ecdf62a (patch) | |
tree | de2cc7a04d3606b161ac28e360e3922796658536 | |
parent | 78cbf1cce093d8e9d682e381e7bfa5dc298d227a (diff) | |
download | wee-slack-c60c1870e7e64a929ecfb9f605e1c14f7ecdf62a.tar.gz |
new_messages should not be set for backlog messages, but for self_msgs
There are scenarios where last_read isn't set, and only self messages
are printed. I experienced it when the only message in the channel was
me joining and renaming the channel. In that case, last_read were never
set, so we should set new_messages for our own messages so last_read
will be set.
-rw-r--r-- | wee_slack.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wee_slack.py b/wee_slack.py index 070a39f..ee74612 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1766,6 +1766,9 @@ class SlackChannel(SlackChannelCommon): if self.channel_buffer: # backlog messages - we will update the read marker as we print these backlog = ts <= last_read + if not backlog: + self.new_messages = True + if not tagset: if self.type in ["im", "mpim"]: tagset = "dm" @@ -1780,9 +1783,6 @@ class SlackChannel(SlackChannelCommon): self_msg = tag_nick == self.team.nick tags = tag(tagset, user=tag_nick, self_msg=self_msg, backlog=backlog, extra_tags=extra_tags) - if not self_msg: - self.new_messages = True - try: if (config.unhide_buffers_with_activity and not self.is_visible() and not self.muted): |