Don't transmit to archived inboxes

This commit is contained in:
Michael 2020-11-23 19:25:22 +00:00
parent 61ff99c410
commit e4e9a20ac8
7 changed files with 70 additions and 19 deletions

View file

@ -104,6 +104,8 @@ class Receiver
return;
}
APContact::unMarkForArchival($apcontact);
$http_signer = HTTPSignature::getSigner($body, $header);
if (empty($http_signer)) {
Logger::warning('Invalid HTTP signature, message will be discarded.');
@ -233,6 +235,7 @@ class Receiver
$profile = APContact::getByURL($object_id);
if (!empty($profile['type'])) {
APContact::unMarkForArchival($profile);
return 'as:' . $profile['type'];
}

View file

@ -670,7 +670,7 @@ class Transmitter
*
* @return boolean "true" if inbox is archived
*/
private static function archivedInbox($url)
public static function archivedInbox($url)
{
return DBA::exists('inbox-status', ['url' => $url, 'archive' => true]);
}