[ENTITY][Note] Include reply_to's targets in child's

This commit is contained in:
2021-12-26 06:50:36 +00:00
parent f5f7fc6056
commit 5e42723624
6 changed files with 42 additions and 15 deletions

View File

@@ -90,7 +90,7 @@ class NoteRepeat extends Entity
);
}
public function getNotificationTargetIds(array $ids_already_known = [], ?int $sender_id = null): array
public function getNotificationTargetIds(array $ids_already_known = [], ?int $sender_id = null, bool $include_additional = true): array
{
if (!\array_key_exists('object', $ids_already_known)) {
$target_ids = Note::getById($this->getNoteId())->getNotificationTargetIds();
@@ -99,7 +99,7 @@ class NoteRepeat extends Entity
}
// Additional actors that should know about this
if (\array_key_exists('additional', $ids_already_known)) {
if ($include_additional && \array_key_exists('additional', $ids_already_known)) {
array_push($target_ids, ...$ids_already_known['additional']);
} else {
return $target_ids;