[PLUGIN][RepeatNote] Do not notify about clone note

Fix redirecion after action
Fix typo in activitypub handler
This commit is contained in:
2021-12-28 17:49:46 +00:00
parent 182c6265a3
commit 4d8e39bf69
4 changed files with 10 additions and 9 deletions

View File

@@ -191,6 +191,7 @@ class Posting extends Component
array $attachments = [],
array $processed_attachments = [],
array $process_note_content_extra_args = [],
bool $notify = true,
): Note {
$scope ??= VisibilityScope::EVERYWHERE; // TODO: If site is private, default to LOCAL
$rendered = null;
@@ -281,7 +282,10 @@ class Posting extends Component
}
DB::flush();
Event::handle('NewNotification', [$actor, $activity, ['object' => $mentioned], _m('{nickname} created a note {note_id}.', ['nickname' => $actor->getNickname(), 'note_id' => $activity->getObjectId()])]);
if ($notify) {
Event::handle('NewNotification', [$actor, $activity, ['object' => $mentioned], _m('{nickname} created a note {note_id}.', ['nickname' => $actor->getNickname(), 'note_id' => $activity->getObjectId()])]);
}
return $note;
}