diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2022-10-02 22:12:41 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2022-10-02 22:12:41 +0200 |
commit | 7a9aa20b96578bbded27cbda72156774a600945a (patch) | |
tree | db1ff7df796b3093ea0dec37700a496d0a545c2c /wee_slack.py | |
parent | a4042244e7a5770be87e7409158e89200fd78166 (diff) | |
download | wee-slack-7a9aa20b96578bbded27cbda72156774a600945a.tar.gz |
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.
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 2 |
1 files changed, 1 insertions, 1 deletions
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): |