diff options
author | Ryan Huber <rhuber@gmail.com> | 2014-10-13 15:31:38 -0700 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2014-10-13 15:31:38 -0700 |
commit | 4bafda97591b19cf2c1863522f6cb42036e6b65f (patch) | |
tree | 2c5c0f2d1bbeb0b2cd93058bb0e35a78f9cceaf4 | |
parent | 008ec806f6bb0c88622ecfe86873472166c8a042 (diff) | |
download | wee-slack-4bafda97591b19cf2c1863522f6cb42036e6b65f.tar.gz |
deal with missing user key in some messages
-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 5155d32..507be53 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -229,8 +229,8 @@ def process_message(message_json): #below prevents typing notification from disapearing if the server sends an unfurled message if message_json.has_key("user"): typing.delete(message_json["channel"], message_json["user"]) + user = user_hash[message_json["user"]] channel = message_json["channel"] - user = user_hash[message_json["message"]["user"]] if message_json["message"].has_key("attachments"): attachments = [x["text"] for x in message_json["message"]["attachments"]] text = "\n".join(attachments) |