aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2019-05-15 12:32:40 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2019-06-02 23:09:20 +0200
commitdb735c1772aff262813c75004d1cd2d698997a13 (patch)
tree83e89d69b12b62fb112e2b34a735d441a03c910b /wee_slack.py
parent08b75e8dbf983ca0a5556ebf7867e6de02df452d (diff)
downloadwee-slack-db735c1772aff262813c75004d1cd2d698997a13.tar.gz
Don't set nick_unknown tag if user isn't set
The only messages left that gets nick_unknown is messages in the team buffer and the "getting channel history" message. There's no point in setting nick_unknown for these.
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 3054e3e..a318f4e 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -3400,7 +3400,7 @@ def tag(tagset=None, user=None, self_msg=False, backlog=False):
"topic": {"irc_topic", "no_highlight", "log3"},
"channel": {"irc_privmsg", "notify_message", "log1"},
}
- nick_tag = {"nick_{}".format(user or "unknown").replace(" ", "_")}
+ nick_tag = {"nick_{}".format(user).replace(" ", "_")} if user else set()
slack_tag = {"slack_{}".format(tagset or "default")}
tags = nick_tag | slack_tag | tagsets.get(tagset, set())
if self_msg or backlog: