Files
mattermost/model
Berke Kalkan f5590d4e5f MM-29726 Allow disabling link previews from certain domains (#16869)
* Add field to config model

Config option for disabling link previews for given domains.

* Refactor functions and corresponding tests

* Expand logic for link preview

Newly added isLinkAllowedForPreview function determines whether a link
should display a preview. It gets corresponding config values consisting
of comma separated domain values, normalizes them and checks for
matches.

* Create tests for link preview restriction

* Fix formatting issue

* Add test cases where images are expected

* Apply suggestions from code review

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>

* Apply remaining code suggestions

* Add RestrictLinkPreviews value to telemetries

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
2021-03-09 12:54:54 -05:00
..
2021-01-07 22:42:43 +05:30
2021-02-18 12:08:01 +01:00
2021-03-05 09:18:37 +01:00
2021-01-07 22:42:43 +05:30
2020-12-09 06:45:17 +01:00
2021-03-05 09:18:37 +01:00
2021-01-07 22:42:43 +05:30
2021-02-18 12:08:01 +01:00
2021-03-01 16:23:27 +01:00