Removed harcoded host names

This commit is contained in:
Michael 2018-09-15 20:48:24 +00:00
parent 86bd283705
commit f5104f3e46

View file

@ -39,11 +39,11 @@ use Friendica\Network\Probe;
* To-do:
*
* Receiver:
* - Activities: Undo, Update
* - Activities: Dislike, Update, Delete
* - Object Types: Person, Tombstome
*
* Transmitter:
* - Activities: Like, Dislike, Update, Undo
* - Activities: Like, Dislike, Update, Delete
* - Object Tyoes: Article, Announce, Person, Tombstone
*
* General:
@ -204,7 +204,7 @@ class ActivityPub
$owner = User::getOwnerDataById($uid);
$data = ['@context' => 'https://www.w3.org/ns/activitystreams',
'id' => 'https://pirati.ca/activity/' . System::createGUID(),
'id' => System::baseUrl() . '/activity/' . System::createGUID(),
'type' => $activity,
'actor' => $owner['url'],
'object' => $profile['url']];
@ -219,7 +219,7 @@ class ActivityPub
$owner = User::getOwnerDataById($uid);
$data = ['@context' => 'https://www.w3.org/ns/activitystreams',
'id' => 'https://pirati.ca/activity/' . System::createGUID(),
'id' => System::baseUrl() . '/activity/' . System::createGUID(),
'type' => 'Accept',
'actor' => $owner['url'],
'object' => ['id' => $id, 'type' => 'Follow',
@ -235,12 +235,12 @@ class ActivityPub
$profile = Probe::uri($target, Protocol::ACTIVITYPUB);
if (empty($id)) {
$id = 'https://pirati.ca/activity/' . System::createGUID();
$id = System::baseUrl() . '/activity/' . System::createGUID();
}
$owner = User::getOwnerDataById($uid);
$data = ['@context' => 'https://www.w3.org/ns/activitystreams',
'id' => 'https://pirati.ca/activity/' . System::createGUID(),
'id' => System::baseUrl() . '/activity/' . System::createGUID(),
'type' => 'Undo',
'actor' => $owner['url'],
'object' => ['id' => $id, 'type' => 'Follow',