[PLUGIN][ActivityPub][Model][Activity] No @context to exclude when object is not embedded.

This commit is contained in:
Diogo Peralta Cordeiro 2022-03-01 17:59:53 +00:00
parent 7ca4330f17
commit 12fb876a6d
No known key found for this signature in database
GPG Key ID: 18D2D35001FBFAB0

View File

@ -194,7 +194,9 @@ class Activity extends Model
}
}
$attr['object']->set('@context', null);
if (!\is_string($attr['object'])) {
$attr['object']->set('@context', null);
}
$type = self::jsonToType($attr);
Event::handle('ActivityPubAddActivityStreamsTwoData', [$type->get('type'), &$type]);
return $type->toJson($options);