Add tag for rooms used by project

dev
gravel 1 year ago
parent f1c7bca0b0
commit a0c384cf5e
Signed by: gravel
GPG Key ID: C0538F3C906B308F

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

@ -309,6 +309,8 @@
* @return \CommunityTag[] Tags as string array.
*/
function get_room_tags(): array {
global $ROOMS_USED_BY_PROJECT;
$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];
}
}

@ -150,10 +150,11 @@
"modded",
"not modded",
"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"];

Loading…
Cancel
Save