aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2014-10-13 15:31:38 -0700
committerRyan Huber <rhuber@gmail.com>2014-10-13 15:31:38 -0700
commit4bafda97591b19cf2c1863522f6cb42036e6b65f (patch)
tree2c5c0f2d1bbeb0b2cd93058bb0e35a78f9cceaf4 /wee_slack.py
parent008ec806f6bb0c88622ecfe86873472166c8a042 (diff)
downloadwee-slack-4bafda97591b19cf2c1863522f6cb42036e6b65f.tar.gz
deal with missing user key in some messages
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 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)