mirror of
https://github.com/friendica/friendica
synced 2025-04-25 16:30:10 +00:00
SVG icons for various fediverse systems
This commit is contained in:
parent
435c37bff4
commit
e73566c0a1
115 changed files with 2640 additions and 236 deletions
|
@ -753,6 +753,10 @@ class GServer
|
|||
$serverdata = self::detectNetworkViaContacts($url, $serverdata);
|
||||
}
|
||||
|
||||
if ($serverdata['platform'] == 'mastodon') {
|
||||
$serverdata = self::detectMastodonForks($serverdata);
|
||||
}
|
||||
|
||||
if (($serverdata['network'] == Protocol::PHANTOM) && in_array($serverdata['detection-method'], [self::DETECT_MANUAL, self::DETECT_BODY])) {
|
||||
self::setFailureByUrl($url);
|
||||
return false;
|
||||
|
@ -1792,6 +1796,23 @@ class GServer
|
|||
return $serverdata;
|
||||
}
|
||||
|
||||
private static function detectMastodonForks(array $serverdata): array
|
||||
{
|
||||
if (strpos($serverdata['version'], 'glitch') !== false) {
|
||||
$serverdata['platform'] = 'glitchsoc';
|
||||
}
|
||||
|
||||
if (strpos($serverdata['version'], 'chuckya') !== false) {
|
||||
$serverdata['platform'] = 'chuckya';
|
||||
}
|
||||
|
||||
if (strpos($serverdata['version'], 'sakura') !== false) {
|
||||
$serverdata['platform'] = 'sakura';
|
||||
}
|
||||
|
||||
return $serverdata;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the given server does have a '/poco' endpoint.
|
||||
* This is used for the 'PortableContact' functionality,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue