]> git.mxchange.org Git - friendica.git/commitdiff
Removed harcoded host names
authorMichael <heluecht@pirati.ca>
Sat, 15 Sep 2018 20:48:24 +0000 (20:48 +0000)
committerMichael <heluecht@pirati.ca>
Sat, 15 Sep 2018 20:48:24 +0000 (20:48 +0000)
src/Protocol/ActivityPub.php

index 73d5231d72995f3fe122cd3ea86f01d82481308f..df6b0342be0aa871ff53f22548d91e306f346f3f 100644 (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',