[COMPONENT][Notification] We must record remote notifications because of feeds

This commit is contained in:
Diogo Peralta Cordeiro 2022-02-13 22:51:42 +00:00
parent 62bf788b90
commit 56c884026f
No known key found for this signature in database
GPG Key ID: 18D2D35001FBFAB0

View File

@ -85,6 +85,13 @@ class Notification extends Component
continue; continue;
} }
// TODO: use https://symfony.com/doc/current/notifier.html // TODO: use https://symfony.com/doc/current/notifier.html
}
} else {
// We have no authority nor responsibility of notifying remote actors of a remote actor's doing
if ($sender->getIsLocal()) {
$remote_targets[] = $target;
}
}
// XXX: Unideal as in failures the rollback will leave behind a false notification, // XXX: Unideal as in failures the rollback will leave behind a false notification,
// but most notifications (all) require flushing the objects first // but most notifications (all) require flushing the objects first
// Should be okay as long as implementors bear this in mind // Should be okay as long as implementors bear this in mind
@ -94,13 +101,6 @@ class Notification extends Component
'reason' => $reason, 'reason' => $reason,
]))); ])));
} }
} else {
// We have no authority nor responsibility of notifying remote actors of a remote actor's doing
if ($sender->getIsLocal()) {
$remote_targets[] = $target;
}
}
}
FreeNetwork::notify($sender, $activity, $remote_targets, $reason); FreeNetwork::notify($sender, $activity, $remote_targets, $reason);