mirror of
https://github.com/nextcloud/spreed.git
synced 2025-12-17 21:12:20 +01:00
fix(settings): Don't warn about missing optional future feature
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
0fa77c27d7
commit
b681a06ce4
2 changed files with 20 additions and 3 deletions
|
|
@ -30,6 +30,10 @@ class Config {
|
||||||
public const SIGNALING_EXTERNAL = 'external';
|
public const SIGNALING_EXTERNAL = 'external';
|
||||||
public const SIGNALING_CLUSTER_CONVERSATION = 'conversation_cluster';
|
public const SIGNALING_CLUSTER_CONVERSATION = 'conversation_cluster';
|
||||||
|
|
||||||
|
public const EXPERIMENTAL_UPDATE_PARTICIPANTS = 1;
|
||||||
|
public const EXPERIMENTAL_RECOVER_SESSION = 2;
|
||||||
|
public const EXPERIMENTAL_CHAT_RELAY = 4;
|
||||||
|
|
||||||
public const SIGNALING_TICKET_V1 = 1;
|
public const SIGNALING_TICKET_V1 = 1;
|
||||||
public const SIGNALING_TICKET_V2 = 2;
|
public const SIGNALING_TICKET_V2 = 2;
|
||||||
|
|
||||||
|
|
@ -790,6 +794,14 @@ class Config {
|
||||||
return $this->appConfig->getAppValueBool('inactivity_enable_lobby');
|
return $this->appConfig->getAppValueBool('inactivity_enable_lobby');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param self::EXPERIMENTAL_* $experiment
|
||||||
|
*/
|
||||||
|
public function hasExperiment(int $experiment): bool {
|
||||||
|
return $this->appConfig->getAppValueInt('experiments_users') & $experiment
|
||||||
|
|| $this->appConfig->getAppValueInt('experiments_guests') & $experiment;
|
||||||
|
}
|
||||||
|
|
||||||
public function isPasswordEnforced(): bool {
|
public function isPasswordEnforced(): bool {
|
||||||
return $this->appConfig->getAppValueBool('force_passwords');
|
return $this->appConfig->getAppValueBool('force_passwords');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -185,11 +185,16 @@ class Manager {
|
||||||
$features = explode(',', $featureHeader);
|
$features = explode(',', $featureHeader);
|
||||||
$features = array_map('trim', $features);
|
$features = array_map('trim', $features);
|
||||||
|
|
||||||
return array_values(array_diff([
|
$optionFeatures = [
|
||||||
'dialout',
|
'dialout',
|
||||||
'join-features',
|
'join-features',
|
||||||
'chat-relay',
|
];
|
||||||
], $features));
|
|
||||||
|
if ($this->talkConfig->hasExperiment(Config::EXPERIMENTAL_CHAT_RELAY)) {
|
||||||
|
$optionFeatures[] = 'chat-relay';
|
||||||
|
}
|
||||||
|
|
||||||
|
return array_values(array_diff($optionFeatures, $features));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSignalingServerLinkForConversation(?Room $room): string {
|
public function getSignalingServerLinkForConversation(?Room $room): string {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue