Skip to content

Commit

Permalink
Merge pull request #10593 from nextcloud/bugfix/noid/increase-user-st…
Browse files Browse the repository at this point in the history
…atus-limitation

feat(user_status): Increase participant limit to 1k users
  • Loading branch information
nickvergessen authored Sep 26, 2023
2 parents 7dadcc0 + b9f16f3 commit 49297fa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions lib/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/RoomController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 49297fa

Please sign in to comment.