aboutsummaryrefslogtreecommitdiffstats
path: root/slack/slack_message.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-08-20 16:36:03 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-18 11:32:53 +0100
commite71e04f1ed15dfa5348350a1f2921458ade3e77a (patch)
tree5cc36dcacbe2aa35a62b40afe40c0f4f56771238 /slack/slack_message.py
parent2cfbb994506cb6d8e63d95b7f98feee06418c67d (diff)
downloadwee-slack-e71e04f1ed15dfa5348350a1f2921458ade3e77a.tar.gz
Set correct tags for self messages
Diffstat (limited to 'slack/slack_message.py')
-rw-r--r--slack/slack_message.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/slack/slack_message.py b/slack/slack_message.py
index a2220f3..403dc41 100644
--- a/slack/slack_message.py
+++ b/slack/slack_message.py
@@ -9,7 +9,7 @@ import weechat
from slack.log import print_exception_once
from slack.python_compatibility import removeprefix, removesuffix
from slack.shared import shared
-from slack.slack_user import format_bot_nick
+from slack.slack_user import SlackUser, format_bot_nick
from slack.task import gather
from slack.util import with_color
@@ -103,7 +103,12 @@ class SlackMessage:
tags.append("bot_message")
if user_or_bot and shared.weechat_version >= 0x04000000:
tags.append(f"prefix_nick_{user_or_bot.nick_color()}")
- log_tags = ["notify_message", "log1"]
+
+ if isinstance(user_or_bot, SlackUser) and user_or_bot.is_self:
+ tags.append("self_msg")
+ log_tags = ["notify_none", "no_highlight", "log1"]
+ else:
+ log_tags = ["notify_message", "log1"]
if backlog:
tags += ["no_highlight", "notify_none", "logger_backlog", "no_log"]