From 7a9aa20b96578bbded27cbda72156774a600945a Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Sun, 2 Oct 2022 22:12:41 +0200 Subject: Fall back to bot_id as nick if no other info is available Apparently there are some bots which are not listed in users.list and which sends messages where the only info about the sender is a bot_id. To fix this properly we will have to look up the bot with bots.info when we encounter an unknown bot_id, but for now just fall back to using the id directly like we do with unknown users to make it possible to use triggers and filters. --- wee_slack.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wee_slack.py') diff --git a/wee_slack.py b/wee_slack.py index 3f1dfcf..a38943e 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -3469,7 +3469,7 @@ class SlackMessage(object): return name else: return "{} :]".format(name) - return self.user_identifier or "" + return self.user_identifier or self.message_json.get("bot_id") or "" @property def sender(self): -- cgit