X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FApi%2FMastodon%2FSuggestions.php;h=6eb2509269cd33c625a9114a592fbec7d1ff90c9;hb=8879d93aad0313c2fcba1a3b3c508dd59b9b4309;hp=97cfa11d3ece8d75289c3401a3b4d7d1aa02c44f;hpb=4d0e6305dd25c25d10a99dcba349bc8cea68831c;p=friendica.git diff --git a/src/Module/Api/Mastodon/Suggestions.php b/src/Module/Api/Mastodon/Suggestions.php index 97cfa11d3e..6eb2509269 100644 --- a/src/Module/Api/Mastodon/Suggestions.php +++ b/src/Module/Api/Mastodon/Suggestions.php @@ -1,6 +1,6 @@ getRequest([ + 'limit' => 40, // Maximum number of results to return. Defaults to 40. + ], $request); - $suggestions = Contact\Relation::getSuggestions($uid, 0, $limit); + $suggestions = Contact\Relation::getSuggestions($uid, 0, $request['limit']); $accounts = []; foreach ($suggestions as $suggestion) { - $accounts[] = DI::mstdnAccount()->createFromContactId($suggestion['id'], $uid); + $accounts[] = [ + 'source' => 'past_interactions', + 'account' => DI::mstdnAccount()->createFromContactId($suggestion['id'], $uid) + ]; } System::jsonExit($accounts);