]> git.mxchange.org Git - friendica.git/blobdiff - include/text.php
There is now a "content-warning" field
[friendica.git] / include / text.php
index 1474b8bf09a230f439cd920552818c505e0b57f2..0aeaa7203be2a384f0a06d525dfc79bad5490b60 100644 (file)
@@ -1182,6 +1182,11 @@ function put_item_in_cache(&$item, $update = false)
                // I'm not sure if we should store it permanently, so we save the old value.
                $body = $item["body"];
 
+               // Add the content warning
+               if (!empty($item['content-warning'])) {
+                       $item["body"] = $item['content-warning'] . '[spoiler]' . $item["body"] . '[/spoiler]';
+               }
+
                $a = get_app();
                redir_private_images($a, $item);