[PLUGINS][Favourite][RepeatNote][DeleteNote][WebMonetization] Make use of 'activitypub_handler' more readable
This commit is contained in:
@@ -376,7 +376,8 @@ class RepeatNote extends NoteHandlerPlugin
|
||||
} else {
|
||||
return Event::next;
|
||||
}
|
||||
} else { // Undo Repeat
|
||||
$activity = self::repeatNote($note ?? Note::getById($note_id), $actor->getId(), source: 'ActivityPub');
|
||||
} elseif ($type_activity->get('type') === 'Undo') { // Undo Repeat
|
||||
if ($type_object instanceof \ActivityPhp\Type\AbstractObject) {
|
||||
$ap_prev_repeat_act = \Plugin\ActivityPub\Util\Model\Activity::fromJson($type_object);
|
||||
$prev_repeat_act = $ap_prev_repeat_act->getActivity();
|
||||
@@ -394,13 +395,11 @@ class RepeatNote extends NoteHandlerPlugin
|
||||
} else {
|
||||
return Event::next;
|
||||
}
|
||||
$activity = self::unrepeatNote($note_id, $actor->getId(), source: 'ActivityPub');
|
||||
} else {
|
||||
return Event::next;
|
||||
}
|
||||
|
||||
if ($type_activity->get('type') === 'Announce') {
|
||||
$activity = self::repeatNote($note ?? Note::getById($note_id), $actor->getId(), source: 'ActivityPub');
|
||||
} else {
|
||||
$activity = self::unrepeatNote($note_id, $actor->getId(), source: 'ActivityPub');
|
||||
}
|
||||
if (!\is_null($activity)) {
|
||||
// Store ActivityPub Activity
|
||||
$ap_act = \Plugin\ActivityPub\Entity\ActivitypubActivity::create([
|
||||
|
Reference in New Issue
Block a user