Fix coding standards

This commit is contained in:
Michael 2024-02-23 14:04:06 +00:00 committed by Hypolite Petovan
parent e4bb463b5b
commit 2b5f8e9c82

View file

@ -1531,7 +1531,7 @@ function bluesky_get_contact(stdClass $author, int $uid, int $fetch_uid): array
function bluesky_get_contact_fields(stdClass $author, int $uid, int $fetch_uid, bool $update): array
{
$nick = $author->handle ?? $author->did;
$nick = $author->handle ?: $author->did;
$fields = [
'uid' => $uid,
'network' => Protocol::BLUESKY,
@ -1543,7 +1543,7 @@ function bluesky_get_contact_fields(stdClass $author, int $uid, int $fetch_uid,
'url' => $author->did,
'nurl' => $author->did,
'alias' => BLUESKY_WEB . '/profile/' . $nick,
'name' => $author->displayName ?? $nick,
'name' => $author->displayName ?: $nick,
'nick' => $nick,
'addr' => $nick,
];
@ -1741,7 +1741,6 @@ function bluesky_xrpc_get(int $uid, string $url, array $parameters = []): ?stdCl
$data = bluesky_get(bluesky_get_user_pds($uid) . '/xrpc/' . $url, HttpClientAccept::JSON, [HttpClientOptions::HEADERS => ['Authorization' => ['Bearer ' . bluesky_get_token($uid)]]]);
DI::pConfig()->set($uid, 'bluesky', 'status', is_null($data) ? BLUEKSY_STATUS_API_FAIL : BLUEKSY_STATUS_SUCCESS);
return $data;
}
function bluesky_get(string $url, string $accept_content = HttpClientAccept::DEFAULT, array $opts = []): ?stdClass