]> git.mxchange.org Git - friendica.git/commitdiff
API: Missing endpoint for reshares had been added
authorMichael <heluecht@pirati.ca>
Thu, 19 Dec 2019 07:19:03 +0000 (07:19 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 19 Dec 2019 07:19:03 +0000 (07:19 +0000)
include/api.php

index a32efa37e4a247973b09369ba2fd211a29064f38..8b5f3315bd4a197e0990fcee9e952347e6708871 100644 (file)
@@ -2851,9 +2851,10 @@ function api_format_items_activities($item, $type = "json")
                'attendyes' => [],
                'attendno' => [],
                'attendmaybe' => [],
+               'announce' => [],
        ];
 
-       $condition = ['uid' => $item['uid'], 'thr-parent' => $item['uri']];
+       $condition = ['uid' => $item['uid'], 'thr-parent' => $item['uri'], 'gravity' => GRAVITY_ACTIVITY];
        $ret = Item::selectForUser($item['uid'], ['author-id', 'verb'], $condition);
 
        while ($parent_item = Item::fetch($ret)) {
@@ -2878,6 +2879,9 @@ function api_format_items_activities($item, $type = "json")
                        case Activity::ATTENDMAYBE:
                                $activities['attendmaybe'][] = $user;
                                break;
+                       case Activity::ANNOUNCE:
+                               $activities['announce'][] = $user;
+                               break;
                        default:
                                break;
                }