X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fitem.php;h=6671d9439335e8c91be42923fd189269e5fa32d4;hb=010ec99b35c2bee8f23060e96c2af3ba5849cf84;hp=441997faa966c9bbafa41bbb2e70006907c73a59;hpb=221a659abeaf3bda3cefd88c80d1b7814f168f3e;p=friendica.git diff --git a/mod/item.php b/mod/item.php index 441997faa9..6671d94393 100644 --- a/mod/item.php +++ b/mod/item.php @@ -119,7 +119,7 @@ function item_post(App $a) { // The URI and the contact is taken from the direct parent which needn't to be the top parent $thr_parent_uri = $toplevel_item['uri']; - if ($toplevel_item['id'] != $toplevel_item['parent']) { + if ($toplevel_item['gravity'] != GRAVITY_PARENT) { $toplevel_item = Item::selectFirst([], ['id' => $toplevel_item['parent']]); } } @@ -650,6 +650,7 @@ function item_post(App $a) { // We set the datarray ID to -1 because in preview mode the dataray // doesn't have an ID. $datarray["id"] = -1; + $datarray["uri-id"] = -1; $datarray["item_id"] = -1; $datarray["author-network"] = Protocol::DFRN; @@ -737,7 +738,7 @@ function item_post(App $a) { Tag::storeFromBody($datarray['uri-id'], $datarray['body']); - if (!\Friendica\Content\Feature::isEnabled($uid, 'explicit_mentions')) { + if (!\Friendica\Content\Feature::isEnabled($uid, 'explicit_mentions') && ($datarray['gravity'] == GRAVITY_COMMENT)) { Tag::createImplicitMentions($datarray['uri-id'], $datarray['thr-parent-id']); }