]> git.mxchange.org Git - friendica.git/commitdiff
Display announces identital for starting posts and comments
authorMichael <heluecht@pirati.ca>
Mon, 21 Feb 2022 05:17:54 +0000 (05:17 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 21 Feb 2022 05:17:54 +0000 (05:17 +0000)
src/Content/Conversation.php

index af96deebdb2b7a9d5f2a1b5f480c8bfd8533f1f2..e441e8ba4b3b7cae3e9fcf317c5887cb3e09dfcc 100644 (file)
@@ -154,7 +154,7 @@ class Conversation
 
                                // Skip when the causer of the parent is the same than the author of the announce
                                if (($verb == Activity::ANNOUNCE) && Post::exists(['uri-id' => $activity['thr-parent-id'],
-                                       'uid' => $activity['uid'], 'causer-id' => $activity['author-id'], 'gravity' => GRAVITY_PARENT])) {
+                                       'uid' => $activity['uid'], 'causer-id' => $activity['author-id'], 'gravity' => [GRAVITY_PARENT, GRAVITY_COMMENT]])) {
                                        continue;
                                }
 
@@ -843,7 +843,7 @@ class Conversation
                                        $row['owner-name']   = $row['causer-name'];
                                }
 
-                               if (($row['gravity'] == GRAVITY_PARENT) && !empty($row['causer-id'])) {
+                               if (in_array($row['gravity'], [GRAVITY_PARENT, GRAVITY_COMMENT]) && !empty($row['causer-id'])) {
                                        $causer = ['uid' => 0, 'id' => $row['causer-id'], 'network' => $row['causer-network'], 'url' => $row['causer-link']];
 
                                        $row['reshared'] = $this->l10n->t('%s reshared this.', '<a href="'. htmlentities(Contact::magicLinkByContact($causer)) .'">' . htmlentities($row['causer-name']) . '</a>');