[ActivityPub] Ensuring notice deletion
ActivityPubPlugin: - Minor onDeleteOwnNotice rewrite Activitypub_inbox_handler: - Add deletion check to incoming notice Activitypub_postman: - Call the correct getUrl function
This commit is contained in:
@@ -213,8 +213,19 @@ class Activitypub_inbox_handler
|
||||
*/
|
||||
private function handle_delete($actor, $object)
|
||||
{
|
||||
$notice = ActivityPubPlugin::grab_notice_from_url($object['object']);
|
||||
$notice->deleteAs($actor);
|
||||
// some moderator could already have deleted the
|
||||
// notice, so we test it first
|
||||
try {
|
||||
$found = Deleted_notice::getByUri($object);
|
||||
$deleted = ($found instanceof Deleted_notice);
|
||||
} catch (NoResultException $e) {
|
||||
$deleted = false;
|
||||
}
|
||||
|
||||
if (!$deleted) {
|
||||
$notice = ActivityPubPlugin::grab_notice_from_url($object);
|
||||
$notice->deleteAs($actor);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user