mirror of
https://github.com/friendica/friendica
synced 2024-11-19 15:03:40 +00:00
Avoid wrong server type detection / Owncast added
This commit is contained in:
parent
8720561e49
commit
30e5ef928a
2 changed files with 8 additions and 2 deletions
|
@ -438,7 +438,7 @@ class GServer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($serverdata['network']) || ($serverdata['network'] == Protocol::ACTIVITYPUB)) {
|
if (empty($nodeinfo['network']) && (empty($serverdata['network']) || ($serverdata['network'] == Protocol::ACTIVITYPUB))) {
|
||||||
$serverdata = self::detectMastodonAlikes($url, $serverdata);
|
$serverdata = self::detectMastodonAlikes($url, $serverdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -478,7 +478,7 @@ class GServer
|
||||||
$serverdata = self::detectNextcloud($url, $serverdata);
|
$serverdata = self::detectNextcloud($url, $serverdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($serverdata['network'])) {
|
if (empty($nodeinfo['network']) && empty($serverdata['network'])) {
|
||||||
$serverdata = self::detectGNUSocial($url, $serverdata);
|
$serverdata = self::detectGNUSocial($url, $serverdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -934,6 +934,11 @@ class GServer
|
||||||
// Version numbers on Nodeinfo are presented with additional info, e.g.:
|
// Version numbers on Nodeinfo are presented with additional info, e.g.:
|
||||||
// 0.6.3.0-p1702cc1c, 0.6.99.0-p1b9ab160 or 3.4.3-2-1191.
|
// 0.6.3.0-p1702cc1c, 0.6.99.0-p1b9ab160 or 3.4.3-2-1191.
|
||||||
$server['version'] = preg_replace('=(.+)-(.{4,})=ism', '$1', $server['version']);
|
$server['version'] = preg_replace('=(.+)-(.{4,})=ism', '$1', $server['version']);
|
||||||
|
|
||||||
|
// qoto advertises itself as Mastodon
|
||||||
|
if (($server['platform'] == 'mastodon') && substr($nodeinfo['software']['version'], -5) == '-qoto') {
|
||||||
|
$server['platform'] = 'qoto';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ class Federation extends BaseAdmin
|
||||||
'mobilizon' => ['name' => 'Mobilizon', 'color' => '#ffd599'], // Background color of parts of the homepage
|
'mobilizon' => ['name' => 'Mobilizon', 'color' => '#ffd599'], // Background color of parts of the homepage
|
||||||
'nextcloud' => ['name' => 'Nextcloud', 'color' => '#1cafff'], // Logo color
|
'nextcloud' => ['name' => 'Nextcloud', 'color' => '#1cafff'], // Logo color
|
||||||
'mistpark' => ['name' => 'Nomad projects (Mistpark, Osada, Roadhouse, Zap)', 'color' => '#348a4a'], // Green like the Mistpark green
|
'mistpark' => ['name' => 'Nomad projects (Mistpark, Osada, Roadhouse, Zap)', 'color' => '#348a4a'], // Green like the Mistpark green
|
||||||
|
'owncast' => ['name' => 'Owncast', 'color' => '#007bff'], // Font color of the homepage
|
||||||
'peertube' => ['name' => 'Peertube', 'color' => '#ffad5c'], // One of the logo colors
|
'peertube' => ['name' => 'Peertube', 'color' => '#ffad5c'], // One of the logo colors
|
||||||
'pixelfed' => ['name' => 'Pixelfed', 'color' => '#11da47'], // One of the logo colors
|
'pixelfed' => ['name' => 'Pixelfed', 'color' => '#11da47'], // One of the logo colors
|
||||||
'pleroma' => ['name' => 'Pleroma', 'color' => '#E46F0F'], // Orange from the text that is used on Pleroma instances
|
'pleroma' => ['name' => 'Pleroma', 'color' => '#E46F0F'], // Orange from the text that is used on Pleroma instances
|
||||||
|
|
Loading…
Reference in a new issue