aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2020-08-29 13:12:45 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2020-09-08 13:17:13 +0200
commitfc2bcba111bdc40a001f9ec481c6dc6143da990c (patch)
tree4374e195f6d99fd172b669f7490567fde46854a0 /wee_slack.py
parent31f2970b9cee84398a8bea8bcde2b46f84bff217 (diff)
downloadwee-slack-fc2bcba111bdc40a001f9ec481c6dc6143da990c.tar.gz
Check that user is not None in typing notices
I have experienced this being called with a user id we're not aware of, in which case metadata["user"] will be None. I think shared teams/channels are the reason for this. We should look up the user id when it's unknown, but for now just ignore typing notices for unknown users so we don't get an exception.
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 fdc7224..c941a7c 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -3325,7 +3325,7 @@ def process_user_change(message_json, eventrouter, team, channel, metadata):
def process_user_typing(message_json, eventrouter, team, channel, metadata):
- if channel:
+ if channel and metadata["user"]:
channel.set_typing(metadata["user"])
w.bar_item_update("slack_typing_notice")