diff --git a/include/conversation.php b/include/conversation.php index 0baf4a819e..1d374c5ca9 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -727,7 +727,12 @@ function conversation_fetch_comments($thread_items, $pinned) { && ($row['thr-parent'] == $row['parent-uri']) && ($row['received'] > $received) && Contact::isSharing($row['author-id'], $row['uid'])) { $direction = ['direction' => 3, 'title' => DI::l10n()->t('%s reshared this.', $row['author-name'])]; - $actor = ['link' => $row['author-link'], 'avatar' => $row['author-avatar'], 'name' => $row['author-name']]; + + $author = ['uid' => 0, 'id' => $row['author-id'], + 'network' => $row['author-network'], 'url' => $row['author-link']]; + $url = '' . htmlentities($row['author-name']) . ''; + + $actor = ['url' => $url, 'link' => $row['author-link'], 'avatar' => $row['author-avatar'], 'name' => $row['author-name']]; $received = $row['received']; } @@ -758,10 +763,13 @@ function conversation_fetch_comments($thread_items, $pinned) { if (!empty($direction)) { foreach ($parentlines as $line) { $comments[$line]['direction'] = $direction; - if (!empty($actor) && DI::pConfig()->get(local_user(), 'system', 'display_resharer') ) { - $comments[$line]['owner-link'] = $actor['link']; - $comments[$line]['owner-avatar'] = $actor['avatar']; - $comments[$line]['owner-name'] = $actor['name']; + if (!empty($actor)) { + $comments[$line]['reshared'] = DI::l10n()->t('%s reshared this.', $actor['url']); + if (DI::pConfig()->get(local_user(), 'system', 'display_resharer') ) { + $comments[$line]['owner-link'] = $actor['link']; + $comments[$line]['owner-avatar'] = $actor['avatar']; + $comments[$line]['owner-name'] = $actor['name']; + } } } } diff --git a/src/Object/Post.php b/src/Object/Post.php index 0f2a0c6518..071652b5e4 100644 --- a/src/Object/Post.php +++ b/src/Object/Post.php @@ -497,6 +497,7 @@ class Post 'uriid' => $item['uri-id'], 'return' => (DI::args()->getCommand()) ? bin2hex(DI::args()->getCommand()) : '', 'direction' => $direction, + 'reshared' => $item['reshared'] ?? '', 'delivery' => [ 'queue_count' => $item['delivery_queue_count'], 'queue_done' => $item['delivery_queue_done'] + $item['delivery_queue_failed'], /// @todo Possibly display it separately in the future diff --git a/view/templates/wall_thread.tpl b/view/templates/wall_thread.tpl index c2b4369593..202eb2b619 100644 --- a/view/templates/wall_thread.tpl +++ b/view/templates/wall_thread.tpl @@ -20,6 +20,9 @@
+ {{if $item.reshared}} +
{{$item.reshared nofilter}}
+ {{/if}}
{{if $item.owner_url}}
diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css index 95e551f94c..12aa1df852 100644 --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@ -1985,6 +1985,7 @@ ul.dropdown-menu li:hover { } /* Media Classes */ +.wall-item-ammounce, .media .time, .media .shared-time, .media .delivery, diff --git a/view/theme/frio/templates/sub/direction.tpl b/view/theme/frio/templates/sub/direction.tpl index 4113c9beed..671272cd00 100644 --- a/view/theme/frio/templates/sub/direction.tpl +++ b/view/theme/frio/templates/sub/direction.tpl @@ -6,7 +6,7 @@ {{elseif $direction.direction == 2}} {{elseif $direction.direction == 3}} - + {{elseif $direction.direction == 4}} {{elseif $direction.direction == 5}} diff --git a/view/theme/frio/templates/wall_thread.tpl b/view/theme/frio/templates/wall_thread.tpl index 6e8e013dcc..38a6cce2b1 100644 --- a/view/theme/frio/templates/wall_thread.tpl +++ b/view/theme/frio/templates/wall_thread.tpl @@ -81,8 +81,8 @@ as the value of $top_child_total (this is done at the end of this file) {{/if}}
- {{if $item.responses.announce && $mode != 'display'}} -
{{$item.responses.announce.output nofilter}}
+ {{if $item.reshared}} +
{{$item.reshared nofilter}}
{{/if}} {{* The avatar picture and the photo-menu *}}