Fix query

This commit is contained in:
Michael 2021-10-03 15:12:50 +00:00
parent 6668591afe
commit 62ece3131c

View File

@ -3630,7 +3630,7 @@ function api_direct_messages_new($type)
$recipient = null; $recipient = null;
if (!empty($_POST['screen_name'])) { if (!empty($_POST['screen_name'])) {
$contacts = Contact::selectFirst(['id', 'nurl', 'network'], ['uid' => api_user(), 'nick' => $_POST['screen_name']]); $contacts = Contact::selectToArray(['id', 'nurl', 'network'], ['uid' => api_user(), 'nick' => $_POST['screen_name']]);
if (DBA::isResult($contacts)) { if (DBA::isResult($contacts)) {
// Selecting the id by priority, friendica first // Selecting the id by priority, friendica first
api_best_nickname($contacts); api_best_nickname($contacts);