From 7a7d55535a98a671a1ae6d09c4f9ebf648231320 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Fri, 22 Sep 2023 16:53:43 +0200 Subject: Show unread join messages for your own user in hotlist When you're invited to a new channel, it's useful that it shows up in the hotlist so you notice it. Previously it would not do that until a message was posted to the channel after you joined. Now the join message itself will also be added to the hotlist. --- wee_slack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wee_slack.py b/wee_slack.py index 239a839..49221bb 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -2524,7 +2524,7 @@ class SlackChannel(SlackChannelCommon): w.prnt_date_tags(self.channel_buffer, ts.major, tags, data) if no_log: w.buffer_set(self.channel_buffer, "print_hooks_enabled", "1") - if backlog or self_msg: + if backlog or (self_msg and tagset != "join"): self.mark_read(ts, update_remote=False, force=True) def store_message(self, message_to_store): @@ -5290,7 +5290,7 @@ def tag( slack_tag = "slack_{}".format(tagset or "default") nick_tag = ["nick_{}".format(user).replace(" ", "_")] if user else [] tags = [ts_tag, slack_tag] + nick_tag + tagsets.get(tagset, []) - if self_msg or backlog: + if (self_msg and tagset != "join") or backlog: tags = tags_set_notify_none(tags) if self_msg: tags += ["self_msg"] -- cgit