[PLUGIN][ActivityPub][Notification] Fix some issues with targetting
This commit is contained in:
@@ -75,7 +75,7 @@ class Repeat extends Controller
|
||||
if ($form_add_to_repeat->isSubmitted()) {
|
||||
$repeat_activity = \Plugin\RepeatNote\RepeatNote::repeatNote(note: $note, actor_id: $actor_id);
|
||||
DB::flush();
|
||||
Event::handle('NewNotification', [$actor = Actor::getById($actor_id), $repeat_activity, [], _m('{actor_id} repeated note {note_id}.', ['{actor_id}' => $actor->getId(), '{note_id}' => $repeat_activity->getObjectId()])]);
|
||||
Event::handle('NewNotification', [$actor = Actor::getById($actor_id), $repeat_activity, $repeat_activity->getAttentionTargets(), _m('{actor_id} repeated note {note_id}.', ['{actor_id}' => $actor->getId(), '{note_id}' => $repeat_activity->getObjectId()])]);
|
||||
|
||||
// Redirect user to where they came from
|
||||
// Prevent open redirect
|
||||
@@ -132,7 +132,7 @@ class Repeat extends Controller
|
||||
if ($form_remove_repeat->isSubmitted()) {
|
||||
if (!\is_null($undo_repeat_activity = \Plugin\RepeatNote\RepeatNote::unrepeatNote(note_id: $note_id, actor_id: $actor_id))) {
|
||||
DB::flush();
|
||||
Event::handle('NewNotification', [$actor = Actor::getById($actor_id), $undo_repeat_activity, [], _m('{actor_id} unrepeated note {note_id}.', ['{actor_id}' => $actor->getId(), '{note_id}' => $note_id])]);
|
||||
Event::handle('NewNotification', [$actor = Actor::getById($actor_id), $undo_repeat_activity, $undo_repeat_activity->getAttentionTargets(), _m('{actor_id} unrepeated note {note_id}.', ['{actor_id}' => $actor->getId(), '{note_id}' => $note_id])]);
|
||||
} else {
|
||||
throw new ClientException(_m('Note wasn\'t repeated!'));
|
||||
}
|
||||
|
Reference in New Issue
Block a user