mirror of
https://github.com/friendica/friendica
synced 2025-04-25 14:30:10 +00:00
Remove entries from queue / relay detection
This commit is contained in:
parent
a676cf8bed
commit
7dcd02938d
4 changed files with 40 additions and 12 deletions
|
@ -26,7 +26,6 @@ use Friendica\Core\Cache\Enum\Duration;
|
|||
use Friendica\Core\Logger;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\Database\DBStructure;
|
||||
use Friendica\DI;
|
||||
use Friendica\Network\HTTPClient\Client\HttpClientAccept;
|
||||
use Friendica\Network\HTTPException;
|
||||
|
@ -539,4 +538,21 @@ class APContact
|
|||
|
||||
HTTPSignature::setInboxStatus($url, true, $shared);
|
||||
}
|
||||
|
||||
public static function isRelay(array $apcontact): bool
|
||||
{
|
||||
if ($apcontact['nick'] != 'relay') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($apcontact['type'] == 'Application') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (in_array($apcontact['type'], ['Group', 'Service']) && ($apcontact['nick'] == 'relay') && is_null($apcontact['outbox'])) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue