aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorJoan Touzet <wohali@users.noreply.github.com>2021-02-22 15:41:53 +0000
committerGitHub <noreply@github.com>2021-02-22 16:41:53 +0100
commite461e0441c3bfef9001bb648db400e195e9fa980 (patch)
tree0c245265bee67a2fea7c203b330b338c0980ea2f /wee_slack.py
parent21e1bc6dc3a3d12880b9430675e54dad6b41bd77 (diff)
downloadwee-slack-e461e0441c3bfef9001bb648db400e195e9fa980.tar.gz
Add support to disable teammate link previews (#815)
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 33a9c11..7bd130f 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -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'