From: Michael Date: Sat, 9 May 2020 15:50:49 +0000 (+0000) Subject: Moved the check for a comment to a different place X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=258e9df0648b8670b05eee03e690f19aa66cc8b9;p=friendica.git Moved the check for a comment to a different place --- diff --git a/mod/item.php b/mod/item.php index 441997faa9..30d9f03e6b 100644 --- a/mod/item.php +++ b/mod/item.php @@ -737,7 +737,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']); } diff --git a/src/Model/Tag.php b/src/Model/Tag.php index b28e723b7a..2f38608ccb 100644 --- a/src/Model/Tag.php +++ b/src/Model/Tag.php @@ -333,10 +333,6 @@ class Tag */ public static function createImplicitMentions(int $uri_id, int $parent_uri_id) { - if ($uri_id == $parent_uri_id) { - return; - } - // Always mention the direct parent author $parent = Item::selectFirst(['author-link', 'author-name'], ['uri-id' => $parent_uri_id]); self::store($uri_id, self::IMPLICIT_MENTION, $parent['author-name'], $parent['author-link']);