Add support to disable teammate link previews
@@ -3793,6 +3793,8 @@ def unwrap_attachments(message_json, text_before):
# $author: (if rest of line is non-empty) $title ($title_link) OR $from_url
# $author: (if no $author on previous line) $text
# $fields
+ if 'original_url' in attachment and not config.link_previews:
+ continue
t = []
prepend_title_text = ''
if 'author_name' in attachment:
@@ -5366,6 +5368,9 @@ class PluginConfig(object):
default='200',
desc='The number of messages to fetch for each channel when fetching'
' history, between 1 and 1000.'),
+ 'link_previews': Setting(
+ default='true',
+ desc='Show previews of website content linked by teammates.'),
'map_underline_to': Setting(
default='_',
desc='When sending underlined text to slack, use this formatting'
