aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-09-22 16:53:43 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2023-09-22 16:53:43 +0200
commit7a7d55535a98a671a1ae6d09c4f9ebf648231320 (patch)
tree6fd5ef1cbaddb1d50dcfcafa064190f5b66e1ff4
parent49ea42f1e1c5f6acf0a6d579600a0db443b343a4 (diff)
downloadwee-slack-7a7d55535a98a671a1ae6d09c4f9ebf648231320.tar.gz
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.
-rw-r--r--wee_slack.py4
1 files 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"]