diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2020-06-07 23:15:38 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2020-06-14 22:19:15 +0200 |
commit | 8ca00d735279e78e759e72c6dff4c17fa43405d5 (patch) | |
tree | 9ea175dd0ee606f3864f3ccd8a734752310ceff8 /wee_slack.py | |
parent | 1075de354b81b9e7555d7ee6c623cfc277f09d8d (diff) | |
download | wee-slack-8ca00d735279e78e759e72c6dff4c17fa43405d5.tar.gz |
Include a prefix character in front of attachments
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index 78861e6..8c9d358 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -3811,7 +3811,8 @@ def unwrap_attachments(message_json, text_before): if t == [] and fallback and not link_shown: t.append(fallback) if t: - attachment_texts.append("\n".join([x.strip() for x in t if x])) + lines = [line for part in t for line in part.strip().split("\n") if part] + attachment_texts.extend("| {}".format(line) for line in lines) return "\n".join(attachment_texts) |