]> git.mxchange.org Git - friendica.git/commitdiff
Display if an item is reshared
authorMichael <heluecht@pirati.ca>
Tue, 2 Apr 2019 05:38:42 +0000 (05:38 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 2 Apr 2019 05:38:42 +0000 (05:38 +0000)
include/conversation.php
src/Object/Post.php

index f7e08571c09ab6f23ed4b847b43980841e572b7e..60646e1a013a0a1edc9350cf32e79c204a4d51cb 100644 (file)
@@ -565,8 +565,12 @@ function conversation(App $a, array $items, Pager $pager, $mode, $update, $previ
        $items = $cb['items'];
 
        $conv_responses = [
-               'like' => ['title' => L10n::t('Likes','title')], 'dislike' => ['title' => L10n::t('Dislikes','title')],
-               'attendyes' => ['title' => L10n::t('Attending','title')], 'attendno' => ['title' => L10n::t('Not attending','title')], 'attendmaybe' => ['title' => L10n::t('Might attend','title')]
+               'like' => ['title' => L10n::t('Likes','title')],
+               'dislike' => ['title' => L10n::t('Dislikes','title')],
+               'attendyes' => ['title' => L10n::t('Attending','title')],
+               'attendno' => ['title' => L10n::t('Not attending','title')],
+               'attendmaybe' => ['title' => L10n::t('Might attend','title')],
+               'announce' => ['title' => L10n::t('Reshares','title')]
        ];
 
        // array with html for each thread (parent+comments)
@@ -963,6 +967,9 @@ function builtin_activity_puller($item, &$conv_responses) {
                        case 'attendmaybe':
                                $verb = ACTIVITY_ATTENDMAYBE;
                                break;
+                       case 'announce':
+                               $verb = ACTIVITY2_ANNOUNCE;
+                               break;
                        default:
                                return;
                }
@@ -1045,6 +1052,9 @@ function format_like($cnt, array $arr, $type, $id) {
                        case 'attendmaybe' :
                                $phrase = L10n::t('%s attends maybe.', $likers);
                                break;
+                       case 'announce' :
+                               $phrase = L10n::t('%s reshared this.', $likers);
+                               break;
                }
        }
 
@@ -1084,6 +1094,10 @@ function format_like($cnt, array $arr, $type, $id) {
                                $phrase = L10n::t('<span  %1$s>%2$d people</span> attend maybe', $spanatts, $cnt);
                                $explikers = L10n::t('%s attend maybe.', $likers);
                                break;
+                       case 'announce':
+                               $phrase = L10n::t('<span  %1$s>%2$d people</span> reshared this', $spanatts, $cnt);
+                               $explikers = L10n::t('%s reshared this.', $likers);
+                               break;
                }
 
                $expanded .= "\t" . '<p class="wall-item-' . $type . '-expanded" id="' . $type . 'list-' . $id . '" style="display: none;" >' . $explikers . EOL . '</p>';
index 2890c87ecda72f379ef702c7638cdc0eb5bc7bc5..a8577dd8bedda9ad7e62db6425b28341f71e99f7 100644 (file)
@@ -238,7 +238,7 @@ class Post extends BaseObject
                $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_dummy($locate));
 
                // process action responses - e.g. like/dislike/attend/agree/whatever
-               $response_verbs = ['like', 'dislike'];
+               $response_verbs = ['like', 'dislike', 'announce'];
 
                $isevent = false;
                $attend = [];