aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2015-11-14 05:38:34 +0000
committerRyan Huber <rhuber@gmail.com>2015-11-14 05:38:34 +0000
commit8cbc89202856d8bbf8359e81d2004384e24f467b (patch)
tree198ceca2b7ad1b431b9a0c655a4aa4a0123af3e2 /wee_slack.py
parent996f21928e89db7650ce24885ed4092a28d1da76 (diff)
downloadwee-slack-8cbc89202856d8bbf8359e81d2004384e24f467b.tar.gz
move to render
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py
index a79b50e..13054ad 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1408,6 +1408,10 @@ def modify_buffer_line(buffer, new_line, time):
def render_message(message_json):
server = servers.find(message_json["myserver"])
+
+ # move message properties down to root of json object
+ message_json = unwrap_message(message_json)
+
if "fallback" in message_json:
text = message_json["fallback"]
elif "text" in message_json:
@@ -1443,8 +1447,6 @@ def process_message(message_json, cache=True):
if "subtype" in message_json and message_json["subtype"] in known_subtypes:
proc[message_json["subtype"]](message_json)
- # move message properties down to root of json object
- message_json = unwrap_message(message_json)
server = servers.find(message_json["myserver"])
channel = channels.find(message_json["channel"])