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