The inbox-status can now be archived for a whole server
This commit is contained in:
@@ -408,7 +408,7 @@ class GServer
|
||||
['nurl' => Strings::normaliseLink($url)]);
|
||||
Logger::info('Set failed status for existing server', ['url' => $url]);
|
||||
if (self::isDefunct($gserver)) {
|
||||
Contact::update(['archive' => true], ['gsid' => $gserver['id']]);
|
||||
self::archiveContacts($gserver['id']);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -418,6 +418,18 @@ class GServer
|
||||
Logger::info('Set failed status for new server', ['url' => $url]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Archive server related contacts and inboxes
|
||||
*
|
||||
* @param integer $gsid
|
||||
* @return void
|
||||
*/
|
||||
private static function archiveContacts(int $gsid)
|
||||
{
|
||||
Contact::update(['archive' => true], ['gsid' => $gsid]);
|
||||
DBA::update('inbox-status', ['archive' => true], ['gsid' => $gsid]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove unwanted content from the given URL
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user