mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 04:15:12 +00:00
update to latest fep-ef61 'gateway' changes
This commit is contained in:
parent
06bdf86e53
commit
78b6a807cb
2 changed files with 14 additions and 13 deletions
|
@ -23,7 +23,7 @@ class Actor extends ASObject
|
|||
public $canSearch;
|
||||
public $indexable;
|
||||
public $assertionMethod;
|
||||
public $aliases;
|
||||
public $gateway;
|
||||
public $permissions;
|
||||
public $openwebauth;
|
||||
public $authredirect;
|
||||
|
@ -356,18 +356,18 @@ class Actor extends ASObject
|
|||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getAliases()
|
||||
public function getGateway()
|
||||
{
|
||||
return $this->aliases;
|
||||
return $this->gateway;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $aliases
|
||||
* @param mixed $gateway
|
||||
* @return Actor
|
||||
*/
|
||||
public function setAliases($aliases)
|
||||
public function setGateway($gateway)
|
||||
{
|
||||
$this->aliases = $aliases;
|
||||
$this->gateway = $gateway;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
|
@ -1622,7 +1622,7 @@ class Activity
|
|||
|
||||
$actor = new Actor();
|
||||
$currhub = false;
|
||||
$aliases =[];
|
||||
$gateways =[];
|
||||
$nomadic = false;
|
||||
|
||||
$channel = ((array_key_exists('channel_id', $p)) ? $p : Channel::from_hash($p['xchan_hash']));
|
||||
|
@ -1673,9 +1673,9 @@ class Activity
|
|||
$locations = self::nomadic_locations(['author_xchan' => $channel['channel_hash']]);
|
||||
if ($locations) {
|
||||
foreach ($locations as $location) {
|
||||
$aliases[] = $location['hubloc_id_url'];
|
||||
$gateways[] = $location['hubloc_url'];
|
||||
}
|
||||
$actor->setAliases($aliases);
|
||||
$actor->setGateway($gateways);
|
||||
}
|
||||
$actor->setId($nomadic ? Channel::getDidResolver($channel) : Channel::url($channel));
|
||||
} else {
|
||||
|
@ -2357,7 +2357,7 @@ class Activity
|
|||
$url = $actorId->getId();
|
||||
$isDid = $actorId->getType() === ActorId::ACTORID_TYPE_DID;
|
||||
if ($isDid) {
|
||||
$aliases = $person_obj['aliases'];
|
||||
$gateways = $person_obj['gateway'];
|
||||
}
|
||||
|
||||
// store the actor record in XConfig
|
||||
|
@ -5101,9 +5101,10 @@ class Activity
|
|||
'https://w3id.org/security/multikey/v1',
|
||||
'https://w3id.org/security/data-integrity/v1',
|
||||
'https://purl.archive.org/socialweb/webfinger',
|
||||
[
|
||||
'fep' => 'https://w3id.org/fep/ef61#',
|
||||
'aliases' => 'fep:aliases'
|
||||
'gateway' => [
|
||||
'@id' => 'https://w3id.org/fep/ef61/gateway',
|
||||
'@type' => '@id',
|
||||
'@container' => '@list'
|
||||
],
|
||||
self::ap_schema($contextType)
|
||||
]];
|
||||
|
|
Loading…
Reference in a new issue