aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTollef Fog Heen <tfheen@err.no>2016-01-19 07:47:12 +0100
committerTollef Fog Heen <tfheen@err.no>2016-02-19 10:56:39 +0100
commit360a91279b54656b29253c07b7ff2a27b12e684d (patch)
tree3bb125f52983323472ab0715e64fad3f5ef60651
parent3c4e38c8133f9b4b6276d50d33ada1abfe84dec3 (diff)
downloadwee-slack-360a91279b54656b29253c07b7ff2a27b12e684d.tar.gz
Avoid unknown entries by checking for title_link properly
-rw-r--r--wee_slack.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 12b891a..e3df8af 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1654,7 +1654,7 @@ def unwrap_attachments(message_json, text_before):
if 'pretext' in attachment:
t.append(attachment['pretext'])
if "title" in attachment:
- if attachment["title_link"]:
+ if 'title_link' in attachment:
t.append('%s (%s)' % (attachment["title"], attachment["title_link"],))
else:
t.append(attachment["title"])