Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lib/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ class Config {
public const SIGNALING_EXTERNAL = 'external';
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_V2 = 2;

Expand Down Expand Up @@ -770,6 +774,14 @@ public function enableLobbyOnLockedRooms(): bool {
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 {
return $this->appConfig->getAppValueBool('force_passwords');
}
Expand Down
11 changes: 8 additions & 3 deletions lib/Signaling/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,16 @@ public function getSignalingServerMissingFeatures(IResponse $response): array {
$features = explode(',', $featureHeader);
$features = array_map('trim', $features);

return array_values(array_diff([
$optionFeatures = [
'dialout',
'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 {
Expand Down
Loading