Fix coding standards
This commit is contained in:
parent
e4bb463b5b
commit
2b5f8e9c82
|
@ -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
|
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 = [
|
$fields = [
|
||||||
'uid' => $uid,
|
'uid' => $uid,
|
||||||
'network' => Protocol::BLUESKY,
|
'network' => Protocol::BLUESKY,
|
||||||
|
@ -1543,7 +1543,7 @@ function bluesky_get_contact_fields(stdClass $author, int $uid, int $fetch_uid,
|
||||||
'url' => $author->did,
|
'url' => $author->did,
|
||||||
'nurl' => $author->did,
|
'nurl' => $author->did,
|
||||||
'alias' => BLUESKY_WEB . '/profile/' . $nick,
|
'alias' => BLUESKY_WEB . '/profile/' . $nick,
|
||||||
'name' => $author->displayName ?? $nick,
|
'name' => $author->displayName ?: $nick,
|
||||||
'nick' => $nick,
|
'nick' => $nick,
|
||||||
'addr' => $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)]]]);
|
$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);
|
DI::pConfig()->set($uid, 'bluesky', 'status', is_null($data) ? BLUEKSY_STATUS_API_FAIL : BLUEKSY_STATUS_SUCCESS);
|
||||||
return $data;
|
return $data;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function bluesky_get(string $url, string $accept_content = HttpClientAccept::DEFAULT, array $opts = []): ?stdClass
|
function bluesky_get(string $url, string $accept_content = HttpClientAccept::DEFAULT, array $opts = []): ?stdClass
|
||||||
|
|
Loading…
Reference in a new issue