Merge branch 'actor_outbox' into 'dev'
Fix some issues from previous commit See merge request dansup/ActivityPub!19
This commit is contained in:
commit
2bada457c2
@ -123,7 +123,10 @@ class apActorOutboxAction extends ManagedAction
|
|||||||
|
|
||||||
// TODO: Handle other types
|
// TODO: Handle other types
|
||||||
if ($note->object_type == 'http://activitystrea.ms/schema/1.0/note') {
|
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)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,14 +48,14 @@ class Activitypub_create extends Managed_DataObject
|
|||||||
* @param array $object
|
* @param array $object
|
||||||
* @return pretty array to be used in a response
|
* @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 = [
|
$res = [
|
||||||
'@context' => [
|
'@context' => [
|
||||||
'https://www.w3.org/ns/activitystreams',
|
'https://www.w3.org/ns/activitystreams',
|
||||||
'https://w3id.org/security/v1'
|
'https://w3id.org/security/v1'
|
||||||
],
|
],
|
||||||
'id' => $id.'/create',
|
'id' => $object.'/create',
|
||||||
'type' => 'Create',
|
'type' => 'Create',
|
||||||
'to' => $object['to'],
|
'to' => $object['to'],
|
||||||
'cc' => $object['cc'],
|
'cc' => $object['cc'],
|
||||||
|
@ -231,7 +231,6 @@ class Activitypub_postman
|
|||||||
public function create($notice)
|
public function create($notice)
|
||||||
{
|
{
|
||||||
$data = Activitypub_create::create_to_array(
|
$data = Activitypub_create::create_to_array(
|
||||||
$notice->getUrl(),
|
|
||||||
$this->actor_uri,
|
$this->actor_uri,
|
||||||
Activitypub_notice::notice_to_array($notice)
|
Activitypub_notice::notice_to_array($notice)
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user