Improvements for relais like relay.fedi.buzz

This commit is contained in:
Michael 2023-07-30 17:46:37 +00:00
parent 06df62a2b5
commit 639d160c24
3 changed files with 11 additions and 7 deletions

View file

@ -584,6 +584,14 @@ class APContact
*/
public static function isRelay(array $apcontact): bool
{
if (in_array($apcontact['type'], ['Person', 'Organization'])) {
return false;
}
if (($apcontact['type'] == 'Service') && empty($apcontact['outbox']) && empty($apcontact['sharedinbox']) && empty($apcontact['following']) && empty($apcontact['followers']) && empty($apcontact['statuses_count'])) {
return true;
}
if (empty($apcontact['nick']) || $apcontact['nick'] != 'relay') {
return false;
}