Add tag for rooms used by project

dev
gravel 2 years ago
parent f1c7bca0b0
commit a0c384cf5e
Signed by: gravel
GPG Key ID: C0538F3C906B308F

@ -78,5 +78,9 @@
$SERVER_ICON_MAPPING = [ $SERVER_ICON_MAPPING = [
"open.getsession.org" => "session", "open.getsession.org" => "session",
"sog.caliban.org" => "privacy" "sog.caliban.org" => "privacy"
] ];
$ROOMS_USED_BY_PROJECT = [
"webdev+118d"
];
?> ?>

@ -309,6 +309,8 @@
* @return \CommunityTag[] Tags as string array. * @return \CommunityTag[] Tags as string array.
*/ */
function get_room_tags(): array { function get_room_tags(): array {
global $ROOMS_USED_BY_PROJECT;
$user_tags = CommunityTag::from_user_tags($this->tags, remove_redundant: true); $user_tags = CommunityTag::from_user_tags($this->tags, remove_redundant: true);
/** /**
@ -385,6 +387,16 @@
); );
} }
if (in_array($this->get_room_identifier(), $ROOMS_USED_BY_PROJECT)) {
$derived_tags[] =
new CommunityTag(
"we're here",
TagType::RESERVED_TAG,
"The sessioncommunities.online maintainer(s) can post updates "
. "or respond to feedback in this Community."
);
}
return [...$derived_tags, ...$user_tags]; return [...$derived_tags, ...$user_tags];
} }
} }

@ -150,10 +150,11 @@
"modded", "modded",
"not modded", "not modded",
"read-only", "read-only",
"uploads off" "uploads off",
"we're here"
]; ];
private const SHOWCASED_TAGS = ["official", "new"]; private const SHOWCASED_TAGS = ["official", "new", "we're here"];
private const REDUNDANT_TAGS = ["session"]; private const REDUNDANT_TAGS = ["session"];

Loading…
Cancel
Save