From 6542596b3d514436b35058165e9921ece7ef6c0c Mon Sep 17 00:00:00 2001 From: Ryan Huber Date: Thu, 13 Apr 2017 16:14:47 +0000 Subject: yay for unfurls --- wee_slack.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/wee_slack.py b/wee_slack.py index cf5ec1f..10e4882 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -2054,19 +2054,19 @@ def subprocess_message_changed(message_json, eventrouter, channel, team): if m: new_message = m #message = SlackMessage(new_message, team, channel) - #if "attachments" in m: - # message_json["attachments"] = m["attachments"] - #if "text" in m: - # if "text" in message_json: - # message_json["text"] += m["text"] - # dbg("added text!") - # else: - # message_json["text"] = m["text"] - #if "fallback" in m: - # if "fallback" in message_json: - # message_json["fallback"] += m["fallback"] - # else: - # message_json["fallback"] = m["fallback"] + if "attachments" in m: + message_json["attachments"] = m["attachments"] + if "text" in m: + if "text" in message_json: + message_json["text"] += m["text"] + dbg("added text!") + else: + message_json["text"] = m["text"] + if "fallback" in m: + if "fallback" in message_json: + message_json["fallback"] += m["fallback"] + else: + message_json["fallback"] = m["fallback"] text_before = (len(new_message['text']) > 0) new_message["text"] += unwrap_attachments(message_json, text_before) -- cgit