Go away LDS
This commit is contained in:
parent
b9c76c2901
commit
edc62d4cb0
|
@ -50,10 +50,7 @@ class Activitypub_accept extends Managed_DataObject
|
|||
public static function accept_to_array($object)
|
||||
{
|
||||
$res = [
|
||||
'@context' => [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
],
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
'id' => common_root_url().'accept_follow_from_'.urlencode($object['actor']).'_to_'.urlencode($object['object']),
|
||||
'type' => 'Accept',
|
||||
'actor' => $object['object'],
|
||||
|
|
|
@ -50,10 +50,7 @@ class Activitypub_announce extends Managed_DataObject
|
|||
public static function announce_to_array($actor, $object)
|
||||
{
|
||||
$res = [
|
||||
'@context' => [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
],
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
"type" => "Announce",
|
||||
"actor" => $actor,
|
||||
"object" => $object
|
||||
|
|
|
@ -50,10 +50,7 @@ class Activitypub_attachment extends Managed_DataObject
|
|||
public static function attachment_to_array($attachment)
|
||||
{
|
||||
$res = [
|
||||
'@context' => [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
],
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
'type' => 'Document',
|
||||
'mediaType' => $attachment->mimetype,
|
||||
'url' => $attachment->getUrl(),
|
||||
|
|
|
@ -51,10 +51,7 @@ class Activitypub_create extends Managed_DataObject
|
|||
public static function create_to_array($actor, $object)
|
||||
{
|
||||
$res = [
|
||||
'@context' => [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
],
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
'id' => $object['id'].'/create',
|
||||
'type' => 'Create',
|
||||
'to' => $object['to'],
|
||||
|
|
|
@ -50,10 +50,7 @@ class Activitypub_delete extends Managed_DataObject
|
|||
public static function delete_to_array($actor, $object)
|
||||
{
|
||||
$res = [
|
||||
'@context' => [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
],
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
'id' => $object.'/delete',
|
||||
'type' => 'Delete',
|
||||
'actor' => $actor,
|
||||
|
|
|
@ -51,10 +51,7 @@ class Activitypub_follow extends Managed_DataObject
|
|||
public static function follow_to_array($actor, $object)
|
||||
{
|
||||
$res = [
|
||||
'@context' => [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
],
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
'id' => common_root_url().'follow_from_'.urlencode($actor).'_to_'.urlencode($object),
|
||||
'type' => 'Follow',
|
||||
'actor' => $actor,
|
||||
|
|
|
@ -51,10 +51,7 @@ class Activitypub_like extends Managed_DataObject
|
|||
public static function like_to_array($actor, $object)
|
||||
{
|
||||
$res = [
|
||||
'@context' => [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
],
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
'id' => common_root_url().'like_from_'.urlencode($actor).'_to_'.urlencode($object),
|
||||
"type" => "Like",
|
||||
"actor" => $actor,
|
||||
|
|
|
@ -51,10 +51,7 @@ class Activitypub_mention_tag extends Managed_DataObject
|
|||
public static function mention_tag_to_array_from_values($href, $name)
|
||||
{
|
||||
$res = [
|
||||
'@context' => [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
],
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
"type" => "Mention",
|
||||
"href" => $href,
|
||||
"name" => $name
|
||||
|
|
|
@ -72,10 +72,7 @@ class Activitypub_notice extends Managed_DataObject
|
|||
$to[]= 'https://www.w3.org/ns/activitystreams#Public';
|
||||
|
||||
$item = [
|
||||
'@context' => [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
],
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
'id' => $notice->getUrl(),
|
||||
'type' => 'Note',
|
||||
'published' => str_replace(' ', 'T', $notice->getCreated()).'Z',
|
||||
|
|
|
@ -96,10 +96,7 @@ class Activitypub_profile extends Managed_DataObject
|
|||
$public_key = $rsa->ensure_public_key($profile);
|
||||
unset($rsa);
|
||||
$res = [
|
||||
'@context' => [
|
||||
"https://www.w3.org/ns/activitystreams",
|
||||
"https://w3id.org/security/v1"
|
||||
],
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
'id' => $uri,
|
||||
'type' => 'Person',
|
||||
'following' => common_local_url('apActorFollowing', ['id' => $id]),
|
||||
|
|
|
@ -50,10 +50,7 @@ class Activitypub_reject extends Managed_DataObject
|
|||
public static function reject_to_array($object)
|
||||
{
|
||||
$res = [
|
||||
'@context' => [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
],
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
"type" => "Reject",
|
||||
"object" => $object
|
||||
];
|
||||
|
|
|
@ -50,10 +50,7 @@ class Activitypub_tag extends Managed_DataObject
|
|||
public static function tag_to_array($tag)
|
||||
{
|
||||
$res = [
|
||||
'@context' => [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
],
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
'name' => $tag,
|
||||
'url' => common_local_url('tag', ['tag' => $tag])
|
||||
];
|
||||
|
|
|
@ -50,10 +50,7 @@ class Activitypub_undo extends Managed_DataObject
|
|||
public static function undo_to_array($object)
|
||||
{
|
||||
$res = [
|
||||
'@context' => [
|
||||
'https://www.w3.org/ns/activitystreams',
|
||||
'https://w3id.org/security/v1'
|
||||
],
|
||||
'@context' => 'https://www.w3.org/ns/activitystreams',
|
||||
'id' => $object['id'].'/undo',
|
||||
'type' => 'Undo',
|
||||
'actor' => $object['actor'],
|
||||
|
|
Reference in New Issue