mirror of
https://github.com/friendica/friendica
synced 2025-04-28 13:04:23 +02:00
Improved message handling / new activity relay handling
This commit is contained in:
parent
7834359957
commit
86105635ca
26 changed files with 280 additions and 428 deletions
|
@ -38,6 +38,7 @@ use Friendica\Util\DateTimeFormat;
|
|||
use Friendica\Util\HTTPSignature;
|
||||
use Friendica\Util\JsonLD;
|
||||
use Friendica\Util\Network;
|
||||
use GuzzleHttp\Psr7\Uri;
|
||||
|
||||
class APContact
|
||||
{
|
||||
|
@ -310,6 +311,8 @@ class APContact
|
|||
|
||||
$apcontact['manually-approve'] = (int)JsonLD::fetchElement($compacted, 'as:manuallyApprovesFollowers');
|
||||
|
||||
$apcontact['suspended'] = (int)JsonLD::fetchElement($compacted, 'toot:suspended');
|
||||
|
||||
if (!empty($compacted['as:generator'])) {
|
||||
$apcontact['baseurl'] = JsonLD::fetchElement($compacted['as:generator'], 'as:url', '@id');
|
||||
$apcontact['generator'] = JsonLD::fetchElement($compacted['as:generator'], 'as:name', '@value');
|
||||
|
@ -380,11 +383,11 @@ class APContact
|
|||
if (strlen($apcontact['photo']) > 255) {
|
||||
$parts = parse_url($apcontact['photo']);
|
||||
unset($parts['fragment']);
|
||||
$apcontact['photo'] = Network::unparseURL($parts);
|
||||
$apcontact['photo'] = Uri::fromParts($parts);
|
||||
|
||||
if (strlen($apcontact['photo']) > 255) {
|
||||
unset($parts['query']);
|
||||
$apcontact['photo'] = Network::unparseURL($parts);
|
||||
$apcontact['photo'] = Uri::fromParts($parts);
|
||||
}
|
||||
|
||||
if (strlen($apcontact['photo']) > 255) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue