mirror of
https://github.com/friendica/friendica
synced 2025-04-28 12:24:23 +02:00
Archive inboxes after 5 days of delivery failures
This commit is contained in:
parent
854cc3e472
commit
198e150ba8
4 changed files with 115 additions and 13 deletions
|
@ -465,6 +465,18 @@ class Transmitter
|
|||
return $receivers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if an inbox is archived
|
||||
*
|
||||
* @param string $url Inbox url
|
||||
*
|
||||
* @return boolean "true" if inbox is archived
|
||||
*/
|
||||
private static function archivedInbox($url)
|
||||
{
|
||||
return DBA::exists('inbox-status', ['url' => $url, 'archive' => true]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetches a list of inboxes of followers of a given user
|
||||
*
|
||||
|
@ -506,7 +518,9 @@ class Transmitter
|
|||
} else {
|
||||
$target = $profile['sharedinbox'];
|
||||
}
|
||||
$inboxes[$target] = $target;
|
||||
if (!self::archivedInbox($target)) {
|
||||
$inboxes[$target] = $target;
|
||||
}
|
||||
}
|
||||
}
|
||||
DBA::close($contacts);
|
||||
|
@ -563,7 +577,9 @@ class Transmitter
|
|||
} else {
|
||||
$target = $profile['sharedinbox'];
|
||||
}
|
||||
$inboxes[$target] = $target;
|
||||
if (!self::archivedInbox($target)) {
|
||||
$inboxes[$target] = $target;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue