diff --git a/app/Transformer/ActivityPub/Verb/UndoAnnounce.php b/app/Transformer/ActivityPub/Verb/UndoAnnounce.php new file mode 100644 index 00000000..f866b229 --- /dev/null +++ b/app/Transformer/ActivityPub/Verb/UndoAnnounce.php @@ -0,0 +1,31 @@ + 'https://www.w3.org/ns/activitystreams', + 'id' => $status->permalink('/undo'), + 'actor' => $status->profile->permalink(), + 'type' => 'Undo', + 'object' => [ + 'id' => $status->permalink(), + 'type' => 'Announce', + 'actor' => $status->profile->permalink(), + 'to' => ['https://www.w3.org/ns/activitystreams#Public'], + 'cc' => [ + $status->profile->permalink(), + $status->profile->follower_url ?? $status->profile->permalink('/followers') + ], + 'published' => $status->created_at->format(DATE_ISO8601), + 'object' => $status->parent()->url(), + ] + ]; + } +}