aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2024-03-09 12:04:58 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-03-29 00:00:15 +0100
commitdcd1536137ec603a2c3db4c10c7688f73c0015b3 (patch)
tree8c9bbdd37f49c22afacb4c4e6b05161e43de7823
parentedaad8ba283b4e61692df69bfaf9c6fcde2a6283 (diff)
downloadwee-slack-dcd1536137ec603a2c3db4c10c7688f73c0015b3.tar.gz
Don't unnecessarily resolve nick an extra time for normal messages
-rw-r--r--slack/slack_message.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/slack/slack_message.py b/slack/slack_message.py
index c16f6f0..7286128 100644
--- a/slack/slack_message.py
+++ b/slack/slack_message.py
@@ -754,9 +754,8 @@ class SlackMessage:
return self._rendered_message
try:
- nick = await self.nick()
me_prefix = (
- f"{nick.format(colorize=True)} "
+ f"{(await self.nick()).format(colorize=True)} "
if self._message_json.get("subtype") == "me_message"
else ""
)