Update server-icon mapping

dev
gravel 8 months ago
parent 07b0125448
commit 13ecfdb0a9
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -16,10 +16,14 @@
function server_icon(CommunityServer $server, string $size): ?string {
global $SERVER_ICON_MAPPING;
$hostname = $server->get_hostname();
if (!isset($SERVER_ICON_MAPPING[$hostname])) {
$pubkey = $server->get_pubkey();
if (isset($SERVER_ICON_MAPPING[$hostname])) {
$room_token = $SERVER_ICON_MAPPING[$hostname];
} else if (isset($SERVER_ICON_MAPPING[$pubkey])) {
$room_token = $SERVER_ICON_MAPPING[$pubkey];
} else {
return "";
}
$room_token = $SERVER_ICON_MAPPING[$hostname];
$room = $server->get_room_by_token($room_token);
if (!$room) {
log_warning("Room $room_token on $hostname does not exist, cannot be used as icon.");

@ -146,7 +146,9 @@
$SERVER_ICON_MAPPING = [
"open.getsession.org" => "session",
"sog.caliban.org" => "privacy",
"session.xanthus.uk" => "midnight-madness",
"c992da3901c59074ce15614ca8bf02b82c9b543e6ba9783cccd0d4e21f621f01" => "midnight-madness",
"a3d56b901a39ba1bb4f6f8ab9dc9bb9343135a99f7d3d0ddc15d9ae2ddcefb55" => "esperanto",
"sogs.cosmicnation.co" => "cosmicnation",
];
/**

Loading…
Cancel
Save