Merge pull request #5804 from annando/issue-5797
Issue 5797: Retweets are now displayed again via API
This commit is contained in:
commit
b5b2bfdd46
1 changed files with 4 additions and 4 deletions
|
@ -2732,7 +2732,7 @@ function api_contactlink_to_array($txt)
|
||||||
* likes => int count,
|
* likes => int count,
|
||||||
* dislikes => int count
|
* dislikes => int count
|
||||||
*/
|
*/
|
||||||
function api_format_items_activities(&$item, $type = "json")
|
function api_format_items_activities($item, $type = "json")
|
||||||
{
|
{
|
||||||
$a = get_app();
|
$a = get_app();
|
||||||
|
|
||||||
|
@ -2747,13 +2747,13 @@ function api_format_items_activities(&$item, $type = "json")
|
||||||
$condition = ['uid' => $item['uid'], 'thr-parent' => $item['uri']];
|
$condition = ['uid' => $item['uid'], 'thr-parent' => $item['uri']];
|
||||||
$ret = Item::selectForUser($item['uid'], ['author-id', 'verb'], $condition);
|
$ret = Item::selectForUser($item['uid'], ['author-id', 'verb'], $condition);
|
||||||
|
|
||||||
while ($item = Item::fetch($ret)) {
|
while ($parent_item = Item::fetch($ret)) {
|
||||||
// not used as result should be structured like other user data
|
// not used as result should be structured like other user data
|
||||||
//builtin_activity_puller($i, $activities);
|
//builtin_activity_puller($i, $activities);
|
||||||
|
|
||||||
// get user data and add it to the array of the activity
|
// get user data and add it to the array of the activity
|
||||||
$user = api_get_user($a, $item['author-id']);
|
$user = api_get_user($a, $parent_item['author-id']);
|
||||||
switch ($item['verb']) {
|
switch ($parent_item['verb']) {
|
||||||
case ACTIVITY_LIKE:
|
case ACTIVITY_LIKE:
|
||||||
$activities['like'][] = $user;
|
$activities['like'][] = $user;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue