mirror of
https://github.com/friendica/friendica
synced 2024-12-23 11:20:15 +00:00
API: fix sender/recipient of PMs
This commit is contained in:
parent
7d1bb9ecf4
commit
c015bb1b77
1 changed files with 4 additions and 5 deletions
|
@ -3700,11 +3700,6 @@ api_register_func('api/direct_messages/destroy', 'api_direct_messages_destroy',
|
|||
function api_direct_messages_box($type, $box, $verbose)
|
||||
{
|
||||
$a = get_app();
|
||||
$user_info = api_get_user($a);
|
||||
|
||||
if (api_user() === false || $user_info === false) {
|
||||
throw new ForbiddenException();
|
||||
}
|
||||
|
||||
// params
|
||||
$count = (x($_GET, 'count') ? $_GET['count'] : 20);
|
||||
|
@ -3726,6 +3721,10 @@ function api_direct_messages_box($type, $box, $verbose)
|
|||
unset($_REQUEST["screen_name"]);
|
||||
unset($_GET["screen_name"]);
|
||||
|
||||
$user_info = api_get_user($a);
|
||||
if (api_user() === false || $user_info === false) {
|
||||
throw new ForbiddenException();
|
||||
}
|
||||
$profile_url = $user_info["url"];
|
||||
|
||||
// pagination
|
||||
|
|
Loading…
Reference in a new issue