You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
pixelfed/app/Federation/ActivityBuilders/AccountDeleteActivityBuilde...

30 lines
776 B
PHP

<?php
namespace App\Federation\ActivityBuilders;
use App\Models\Profile;
class AccountDeleteActivityBuilder
{
/**
* Delete of the actor itself. The object is the bare actor id, which is
* the shape Mastodon sends and the one every implementation that handles
* account deletion understands.
*
* @return array<string, mixed>
*/
public function build(Profile $profile): array
{
$actorId = $profile->permalink();
return [
'@context' => 'https://www.w3.org/ns/activitystreams',
'id' => $actorId.'#delete',
'type' => 'Delete',
'actor' => $actorId,
'to' => ['https://www.w3.org/ns/activitystreams#Public'],
'object' => $actorId,
];
}
}