Allow the search for contacts on blocked servers via web

This commit is contained in:
Michael 2023-03-29 18:39:21 +00:00
parent e6ce165bb5
commit f0743e4e12
4 changed files with 15 additions and 11 deletions

View file

@ -60,7 +60,7 @@ class Search extends BaseApi
}
if (empty($accounts)) {
$contacts = Contact::searchByName($request['q'], '', $request['following'] ? $uid : 0, $request['limit'], $request['offset']);
$contacts = Contact::searchByName($request['q'], '', false, $request['following'] ? $uid : 0, $request['limit'], $request['offset']);
foreach ($contacts as $contact) {
$accounts[] = DI::mstdnAccount()->createFromContactId($contact['id'], $uid);
}

View file

@ -115,7 +115,7 @@ class Search extends BaseApi
}
$accounts = [];
foreach (Contact::searchByName($q, '', $following ? $uid : 0, $limit, $offset) as $contact) {
foreach (Contact::searchByName($q, '', $following ? $uid : 0, false, $limit, $offset) as $contact) {
$accounts[] = DI::mstdnAccount()->createFromContactId($contact['id'], $uid);
}