diff --git a/plugins/ActivityPub/Util/Model/Activity.php b/plugins/ActivityPub/Util/Model/Activity.php index 1208dc1ef4..23bcb770b2 100644 --- a/plugins/ActivityPub/Util/Model/Activity.php +++ b/plugins/ActivityPub/Util/Model/Activity.php @@ -170,8 +170,8 @@ class Activity extends Model 'actor' => $object->getActor()->getUri(Router::ABSOLUTE_URL), ]; - $attr['to'] = []; - $attr['cc'] = ['https://www.w3.org/ns/activitystreams#Public']; + $attr['to'] = ['https://www.w3.org/ns/activitystreams#Public']; + $attr['cc'] = []; foreach ($object->getAttentionTargets() as $target) { $attr['cc'][] = $target->getUri(); } @@ -191,6 +191,7 @@ class Activity extends Model } if (!\is_string($attr['object'])) { + $attr['@context'] = $attr['object']->get('@context'); $attr['object']->set('@context', null); } $type = self::jsonToType($attr);