mirror of
https://github.com/friendica/friendica
synced 2025-04-28 03:10:11 +00:00
Clarify usage of ActivityPub\Transmitter::fetchTargetInboxes in Worker\APDelivery queuing
- $inbox is now always a string - $receivers should be correctly populated now - $target_id is renamed to $item_id and correctly initialized to 0 for non-item deliveries
This commit is contained in:
parent
e4228c6218
commit
d59fcd5093
3 changed files with 19 additions and 41 deletions
|
@ -81,10 +81,10 @@ class Notifier
|
|||
|
||||
$mail = ActivityPub\Transmitter::ItemArrayFromMail($target_id);
|
||||
$inboxes = ActivityPub\Transmitter::fetchTargetInboxes($mail, $uid, true);
|
||||
foreach ($inboxes as $inbox) {
|
||||
foreach ($inboxes as $inbox => $receivers) {
|
||||
Logger::info('Delivery via ActivityPub', ['cmd' => $cmd, 'target' => $target_id, 'inbox' => $inbox]);
|
||||
Worker::add(['priority' => PRIORITY_HIGH, 'created' => $a->queue['created'], 'dont_fork' => true],
|
||||
'APDelivery', $cmd, $target_id, $inbox, $uid);
|
||||
'APDelivery', $cmd, $target_id, $inbox, $uid, $receivers);
|
||||
}
|
||||
} elseif ($cmd == Delivery::SUGGESTION) {
|
||||
$suggest = DI::fsuggest()->getById($target_id);
|
||||
|
@ -744,10 +744,10 @@ class Notifier
|
|||
DBA::close($contacts_stmt);
|
||||
|
||||
$inboxes = ActivityPub\Transmitter::fetchTargetInboxesforUser(0);
|
||||
foreach ($inboxes as $inbox) {
|
||||
foreach ($inboxes as $inbox => $receivers) {
|
||||
Logger::info('Account removal via ActivityPub', ['uid' => $self_user_id, 'inbox' => $inbox]);
|
||||
Worker::add(['priority' => PRIORITY_NEGLIGIBLE, 'created' => $created, 'dont_fork' => true],
|
||||
'APDelivery', Delivery::REMOVAL, '', $inbox, $self_user_id);
|
||||
'APDelivery', Delivery::REMOVAL, 0, $inbox, $self_user_id, $receivers);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue