mirror of
https://github.com/friendica/friendica
synced 2025-04-25 07:50:10 +00:00
The inbox-status can now be archived for a whole server
This commit is contained in:
parent
7942881f7e
commit
e21db0fe6d
7 changed files with 105 additions and 15 deletions
|
@ -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
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue