From 4bafda97591b19cf2c1863522f6cb42036e6b65f Mon Sep 17 00:00:00 2001 From: Ryan Huber Date: Mon, 13 Oct 2014 15:31:38 -0700 Subject: deal with missing user key in some messages --- 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 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) -- cgit