diff --git a/php/utils/servers-rooms.php b/php/utils/servers-rooms.php index de08dca..1c1226e 100644 --- a/php/utils/servers-rooms.php +++ b/php/utils/servers-rooms.php @@ -1,7 +1,6 @@ server->pubkey, 0, 4); return "$token+$pubkey_4"; } - - /** - * Returns an estimate for the weekly active users of a CommunityRoom. - * @return int Active user count normalized by tracked timespan of active users. - */ - function get_weekly_active_users(): int { - global $WEEK_SECONDS; - - $active_users = $this->active_users; - - if ($active_users == null) { - return 0; - } - - $active_users_cutoff = $this->active_users_cutoff; - - if ($active_users_cutoff == null) { - return $active_users; - } - - return floor($active_users * $WEEK_SECONDS / $active_users_cutoff); - } } /** diff --git a/sites/+components/tbl_communities.php b/sites/+components/tbl_communities.php index 8ea6846..d49d139 100644 --- a/sites/+components/tbl_communities.php +++ b/sites/+components/tbl_communities.php @@ -57,7 +57,7 @@ $language = html_sanitize($room->language_flag); $name = html_sanitize($room->name); $desc = html_sanitize($room->description); - $users = html_sanitize($room->get_weekly_active_users()); + $users = html_sanitize($room->active_users); $preview_link = html_sanitize($room->get_preview_url()); $join_link = html_sanitize($room->get_join_url()); $pubkey = html_sanitize($pubkey);