From b9f16f3ef7e4078edde8e0e27e0ea12095f4a275 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 26 Sep 2023 13:07:32 +0200 Subject: [PATCH] feat(user_status): Increase participant limit to 1k users Currently limiting to 1k users because the user_status API would yield an error on Oracle otherwise. Clients should use a virtual scrolling mechanism so the data should not be a problem nowadays Signed-off-by: Joas Schilling --- lib/Config.php | 7 +++++++ lib/Controller/RoomController.php | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/Config.php b/lib/Config.php index 0b78db6f8ad..15ae7f92a15 100644 --- a/lib/Config.php +++ b/lib/Config.php @@ -43,6 +43,13 @@ class Config { public const SIGNALING_TICKET_V1 = 1; public const SIGNALING_TICKET_V2 = 2; + /** + * Currently limiting to 1k users because the user_status API would yield + * an error on Oracle otherwise. Clients should use a virtual scrolling + * mechanism so the data should not be a problem nowadays + */ + public const USER_STATUS_INTEGRATION_LIMIT = 1000; + protected array $canEnableSIP = []; public function __construct( diff --git a/lib/Controller/RoomController.php b/lib/Controller/RoomController.php index 3016626ead5..9c3ddaa82b5 100644 --- a/lib/Controller/RoomController.php +++ b/lib/Controller/RoomController.php @@ -688,7 +688,7 @@ protected function formatParticipantList(array $participants, bool $includeStatu if ($this->userId !== null && $includeStatus - && count($participants) < 100 + && count($participants) < Config::USER_STATUS_INTEGRATION_LIMIT && $this->appManager->isEnabledForUser('user_status')) { $userIds = array_filter(array_map(static function (Participant $participant) { if ($participant->getAttendee()->getActorType() === Attendee::ACTOR_USERS) {