mirror of
https://github.com/friendica/friendica
synced 2024-11-10 00:23:00 +00:00
Merge pull request #13892 from annando/no-preview-on-sensitive
Don't display preview images for links, when the post is marked as sensitive
This commit is contained in:
commit
686d0b6dbb
1 changed files with 6 additions and 0 deletions
|
@ -3823,6 +3823,12 @@ class Item
|
|||
} elseif (preg_match("/.*(\[attachment.*?\].*?\[\/attachment\]).*/ism", $body, $match)) {
|
||||
$data = BBCode::getAttachmentData($match[1]);
|
||||
}
|
||||
|
||||
if ($sensitive) {
|
||||
$data['image'] = '';
|
||||
$data['preview'] = '';
|
||||
}
|
||||
|
||||
DI::profiler()->stopRecording();
|
||||
|
||||
if (isset($data['url']) && !in_array(strtolower($data['url']), $ignore_links)) {
|
||||
|
|
Loading…
Reference in a new issue