]> git.mxchange.org Git - friendica.git/commitdiff
Moved the check for a comment to a different place
authorMichael <heluecht@pirati.ca>
Sat, 9 May 2020 15:50:49 +0000 (15:50 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 9 May 2020 15:50:49 +0000 (15:50 +0000)
mod/item.php
src/Model/Tag.php

index 441997faa966c9bbafa41bbb2e70006907c73a59..30d9f03e6bf40101a63651c7d73e27d5d374d0de 100644 (file)
@@ -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']);
        }
 
index b28e723b7ab4776f58c99aadfdcf7b3cc0467a7f..2f38608ccb47c29790adf14679809f05c882582b 100644 (file)
@@ -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']);