https://reisub.nsupdate.info/git
/
friendica.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cc8fcc
)
Don't display preview images for links, when the post is marked as sensitive
author
Michael
<heluecht@pirati.ca>
Mon, 12 Feb 2024 06:01:07 +0000
(06:01 +0000)
committer
Michael
<heluecht@pirati.ca>
Mon, 12 Feb 2024 06:01:07 +0000
(06:01 +0000)
src/Model/Item.php
patch
|
blob
|
history
diff --git
a/src/Model/Item.php
b/src/Model/Item.php
index
aa3a8bc
..
9aa7e1b
100644
(file)
--- a/
src/Model/Item.php
+++ b/
src/Model/Item.php
@@
-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)) {