From 258e9df0648b8670b05eee03e690f19aa66cc8b9 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 9 May 2020 15:50:49 +0000 Subject: [PATCH] Moved the check for a comment to a different place --- mod/item.php | 2 +- src/Model/Tag.php | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/mod/item.php b/mod/item.php index 441997faa..30d9f03e6 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 b28e723b7..2f38608cc 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']);