Merge pull request #7970 from annando/api-announce
API: Missing endpoint for reshares had been added
This commit is contained in:
commit
2fbfae0ce5
1 changed files with 5 additions and 1 deletions
|
@ -2851,9 +2851,10 @@ function api_format_items_activities($item, $type = "json")
|
||||||
'attendyes' => [],
|
'attendyes' => [],
|
||||||
'attendno' => [],
|
'attendno' => [],
|
||||||
'attendmaybe' => [],
|
'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);
|
$ret = Item::selectForUser($item['uid'], ['author-id', 'verb'], $condition);
|
||||||
|
|
||||||
while ($parent_item = Item::fetch($ret)) {
|
while ($parent_item = Item::fetch($ret)) {
|
||||||
|
@ -2878,6 +2879,9 @@ function api_format_items_activities($item, $type = "json")
|
||||||
case Activity::ATTENDMAYBE:
|
case Activity::ATTENDMAYBE:
|
||||||
$activities['attendmaybe'][] = $user;
|
$activities['attendmaybe'][] = $user;
|
||||||
break;
|
break;
|
||||||
|
case Activity::ANNOUNCE:
|
||||||
|
$activities['announce'][] = $user;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue