의 미러
https://github.com/friendica/friendica
synced 2025-09-07 21:21:52 +02:00
API: Direct Messages via the API now work again.
This commit is contained in:
부모
9f62dd8627
커밋
875592f285
1개의 변경된 파일과 8개의 추가작업 그리고 4개의 파일을 삭제
|
@ -456,10 +456,13 @@ $called_api = null;
|
|||
* Contact url or False if contact id is unknown
|
||||
*/
|
||||
function api_unique_id_to_url($id) {
|
||||
$r = q("SELECT `url` FROM `contact` WHERE `uid` = 0 AND `id` = %d LIMIT 1",
|
||||
intval($id));
|
||||
$r = dba::select('contact', array('url'), array('uid' => 0, 'id' => $id), array('limit' => 1));
|
||||
|
||||
return (dbm::is_result($r) && $r[0]["url"]);
|
||||
if (dbm::is_result($r)) {
|
||||
return $r["url"];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3027,8 +3030,9 @@ $called_api = null;
|
|||
api_best_nickname($r);
|
||||
|
||||
$recipient = api_get_user($a, $r[0]['nurl']);
|
||||
} else
|
||||
} else {
|
||||
$recipient = api_get_user($a, $_POST['user_id']);
|
||||
}
|
||||
|
||||
$replyto = '';
|
||||
$sub = '';
|
||||
|
|
불러오는 중…
테이블 추가
Add a link
Reference in a new issue