Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2021-01-21 16:02:13 +0300
committerJoas Schilling <coding@schilljs.com>2021-10-27 15:33:30 +0300
commit24ccb1d052f4408c5018f66ec0c016cbeee4cdf9 (patch)
tree68ad6f504ec8a4b43d7eace5661ff323ad77a656 /lib
parent1ace0327d2171f79abbf33ba8f8d9177856a568f (diff)
Add config setting to limit the number of videos in the grid
The limit can be set with OCC like "occ config:app:set spreed --value=XXX grid_videos_limit". The changes will take effect once the user reloads the page. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Config.php4
-rw-r--r--lib/TInitialState.php5
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/Config.php b/lib/Config.php
index 8e0133a85..a036885c7 100644
--- a/lib/Config.php
+++ b/lib/Config.php
@@ -393,4 +393,8 @@ class Config {
$hash = hash_hmac('sha256', $data, $secret);
return hash_equals($hash, substr($ticket, $lastColon + 1));
}
+
+ public function getGridVideosLimit(): string {
+ return $this->config->getAppValue('spreed', 'grid_videos_limit', '0');
+ }
}
diff --git a/lib/TInitialState.php b/lib/TInitialState.php
index 4ad6750ee..0d4c9e446 100644
--- a/lib/TInitialState.php
+++ b/lib/TInitialState.php
@@ -72,6 +72,11 @@ trait TInitialState {
'sip_dialin_info',
$this->talkConfig->getDialInInfo()
);
+
+ $this->initialStateService->provideInitialState(
+ 'talk', 'grid_videos_limit',
+ $this->talkConfig->getGridVideosLimit()
+ );
}
protected function publishInitialStateForUser(IUser $user, IRootFolder $rootFolder, IAppManager $appManager): void {