[PLUGIN][ActivityPub][Model][Activity] If the object is wrapped in an activity, exclude the @context

This commit is contained in:
Diogo Peralta Cordeiro 2022-02-23 22:39:18 +00:00
parent d12038a9f8
commit 4754593cde
Signed by: diogo
GPG Key ID: 18D2D35001FBFAB0

View File

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