X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FItem.php;h=2410a0441b5d61b77f007ca2b02531912c126c18;hb=52a25ce6181c0b48a978f37a4ae3b94357dbb712;hp=12184a3a55d69de9ea00861b971af5278754aecf;hpb=b7288b2bfd170bf5ba0c418a7617067eb6e65b9a;p=friendica.git diff --git a/src/Model/Item.php b/src/Model/Item.php index 12184a3a55..2410a0441b 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -201,8 +201,6 @@ class Item $notify_items = []; while ($item = DBA::fetch($items)) { - Post\Media::deleteByURIId($item['uri-id'], [Post\Media::HTML]); - if (!empty($fields['body'])) { if (!empty($item['quote-uri-id'])) { $fields['body'] = BBCode::removeSharedData($fields['body']); @@ -877,7 +875,7 @@ class Item /* * Do we already have this item? * We have to check several networks since Friendica posts could be repeated - * via OStatus (maybe Diasporsa as well) + * via OStatus (maybe Diaspora as well) */ $duplicate = self::getDuplicateID($item); if ($duplicate) { @@ -894,6 +892,8 @@ class Item $item['post-type'] = empty($item['title']) ? self::PT_NOTE : self::PT_ARTICLE; } + $defined_permissions = isset($item['allow_cid']) && isset($item['allow_gid']) && isset($item['deny_cid']) && isset($item['deny_gid']) && isset($item['private']); + $item['wall'] = intval($item['wall'] ?? 0); $item['extid'] = trim($item['extid'] ?? ''); $item['author-name'] = trim($item['author-name'] ?? ''); @@ -995,7 +995,7 @@ class Item $item['wall'] = $toplevel_parent['wall']; // Reshares have to keep their permissions to allow forums to work - if (!$item['origin'] || ($item['verb'] != Activity::ANNOUNCE)) { + if (!$defined_permissions && (!$item['origin'] || ($item['verb'] != Activity::ANNOUNCE))) { $item['allow_cid'] = $toplevel_parent['allow_cid']; $item['allow_gid'] = $toplevel_parent['allow_gid']; $item['deny_cid'] = $toplevel_parent['deny_cid']; @@ -1018,7 +1018,7 @@ class Item * This differs from the above settings as it subtly allows comments from * email correspondents to be private even if the overall thread is not. */ - if ($toplevel_parent['private']) { + if (!$defined_permissions && $toplevel_parent['private']) { $item['private'] = $toplevel_parent['private']; } @@ -1065,7 +1065,7 @@ class Item } // ACL settings - if (!empty($item['allow_cid'] . $item['allow_gid'] . $item['deny_cid'] . $item['deny_gid'])) { + if (!$defined_permissions && !empty($item['allow_cid'] . $item['allow_gid'] . $item['deny_cid'] . $item['deny_gid'])) { $item['private'] = self::PRIVATE; }