Fix some issues from previous commit

This commit is contained in:
Diogo Cordeiro 2018-08-04 06:05:41 +01:00
parent 6a238e4176
commit dca1d8f0c5
3 changed files with 6 additions and 4 deletions

View File

@ -123,7 +123,10 @@ class apActorOutboxAction extends ManagedAction
// TODO: Handle other types
if ($note->object_type == 'http://activitystrea.ms/schema/1.0/note') {
$notices[] = Activitypub_notice::notice_to_array($note);
$notices[] = Activitypub_create::create_to_array(
ActivityPubPlugin::actor_uri($note->getProfile()),
Activitypub_notice::notice_to_array($note)
);
}
}

View File

@ -48,14 +48,14 @@ class Activitypub_create extends Managed_DataObject
* @param array $object
* @return pretty array to be used in a response
*/
public static function create_to_array($id, $actor, $object)
public static function create_to_array($actor, $object)
{
$res = [
'@context' => [
'https://www.w3.org/ns/activitystreams',
'https://w3id.org/security/v1'
],
'id' => $id.'/create',
'id' => $object.'/create',
'type' => 'Create',
'to' => $object['to'],
'cc' => $object['cc'],

View File

@ -231,7 +231,6 @@ class Activitypub_postman
public function create($notice)
{
$data = Activitypub_create::create_to_array(
$notice->getUrl(),
$this->actor_uri,
Activitypub_notice::notice_to_array($notice)
);