From bf918edfdebf88eaa10fb0b6f92f5b105e922f50 Mon Sep 17 00:00:00 2001 From: gravel Date: Fri, 19 May 2023 17:16:43 +0200 Subject: [PATCH] Remove redundant user tag filter --- php/utils/servers-rooms.php | 1 - php/utils/tags.php | 13 ------------- 2 files changed, 14 deletions(-) diff --git a/php/utils/servers-rooms.php b/php/utils/servers-rooms.php index d08cf07..493c670 100644 --- a/php/utils/servers-rooms.php +++ b/php/utils/servers-rooms.php @@ -110,7 +110,6 @@ function jsonSerialize(): array { $details = get_object_vars($this); unset($details['server']); - $details['tags'] = CommunityTag::cacheable_room_tags($details['tags']); return $details; } diff --git a/php/utils/tags.php b/php/utils/tags.php index 446259c..ed184e6 100644 --- a/php/utils/tags.php +++ b/php/utils/tags.php @@ -42,19 +42,6 @@ return $details; } - /** - * @param \CommunityTag[] $tags - * @return string[] - */ - public static function cacheable_room_tags(array $tags) { - return array_map( - function (\CommunityTag $tag) { return $tag->__toString(); }, - array_filter($tags, function(\CommunityTag $tag) { - return $tag->type == TagType::USER_TAG; - }) - ); - } - private static function preprocess_tag(?string $tag) { $tag = trim($tag);