Merge branch 'actor_outbox' into 'dev'

Fix some issues from previous commit

See merge request dansup/ActivityPub!19
This commit is contained in:
Diogo Cordeiro 2018-08-04 05:06:43 +00:00
commit 2bada457c2
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)
);