aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py26
1 files 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)