]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Conversation.php
Merge pull request #11269 from tobiasd/20220221-de
[friendica.git] / src / Content / Conversation.php
index d8cbbf7cbb6dec2129ea5cdaab2c4bbbe5ad2a97..e441e8ba4b3b7cae3e9fcf317c5887cb3e09dfcc 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -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;
                                }
 
@@ -669,6 +669,7 @@ class Conversation
                                                'folders'              => $folders,
                                                'text'                 => strip_tags($body_html),
                                                'localtime'            => DateTimeFormat::local($item['created'], 'r'),
+                                               'utc'                  => DateTimeFormat::utc($item['created'], 'c'),
                                                'ago'                  => (($item['app']) ? $this->l10n->t('%s from %s', Temporal::getRelativeDate($item['created']), $item['app']) : Temporal::getRelativeDate($item['created'])),
                                                'location_html'        => $location_html,
                                                'indent'               => '',
@@ -842,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>');