diff options
author | Joan Touzet <wohali@users.noreply.github.com> | 2021-02-22 15:41:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-22 16:41:53 +0100 |
commit | e461e0441c3bfef9001bb648db400e195e9fa980 (patch) | |
tree | 0c245265bee67a2fea7c203b330b338c0980ea2f /wee_slack.py | |
parent | 21e1bc6dc3a3d12880b9430675e54dad6b41bd77 (diff) | |
download | wee-slack-e461e0441c3bfef9001bb648db400e195e9fa980.tar.gz |
Add support to disable teammate link previews (#815)
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 5 |
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' |