Browse Source

Update Announce AP Transformer

Daniel Supernault 6 years ago
parent
commit
7522364f23
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/Transformer/ActivityPub/Verb/Announce.php

+ 2 - 2
app/Transformer/ActivityPub/Verb/Announce.php

@@ -16,8 +16,8 @@ class Announce extends Fractal\TransformerAbstract
     		'actor'		=> $status->profile->permalink(),
     		'to' 		=> ['https://www.w3.org/ns/activitystreams#Public'],
     		'cc' 		=> [
-    			$status->parent()->profile->permalink(),
-    			$status->parent()->profile->follower_url
+    			$status->profile->permalink(),
+    			$status->profile->follower_url ?? $status->profile->permalink('/followers')
     		],
     		'published' => $status->created_at->format(DATE_ISO8601),
     		'object'	=> $status->parent()->url(),