mirror of
https://github.com/pierre42100/ComunicAPI
synced 2024-11-23 13:59:29 +00:00
Calls configuration inlucdes the maximum number of members per call.
This commit is contained in:
parent
9d3fb3b342
commit
e32fbc6355
@ -188,6 +188,7 @@ class CallsController {
|
||||
|
||||
//Give full configuration calls are enabled
|
||||
if($config->get_enabled()){
|
||||
$data["maximum_number_members"] = $config->get_maximum_number_members();
|
||||
$data["signal_server_name"] = $config->get_signal_server_name();
|
||||
$data["signal_server_port"] = $config->get_signal_server_port();
|
||||
$data["is_signal_server_secure"] = $config->get_is_signal_server_secure();
|
||||
|
@ -29,6 +29,7 @@ class CallsComponents {
|
||||
|
||||
$config = new CallsConfig();
|
||||
$config->set_enabled($callConfig["enabled"]);
|
||||
$config->set_maximum_number_members($callConfig["maximum_number_members"]);
|
||||
$config->set_signal_server_name($callConfig["signal_server_name"]);
|
||||
$config->set_signal_server_port($callConfig["signal_server_port"]);
|
||||
$config->set_is_signal_server_secure($callConfig["is_signal_server_secure"]);
|
||||
|
@ -9,6 +9,7 @@ class CallsConfig {
|
||||
|
||||
//Private fields
|
||||
private $enabled = false;
|
||||
private $maximum_number_members = -1;
|
||||
private $signal_server_name;
|
||||
private $signal_server_port;
|
||||
private $is_signal_server_secure;
|
||||
@ -28,6 +29,20 @@ class CallsConfig {
|
||||
}
|
||||
|
||||
|
||||
//Get the maximum number of members for a conversation
|
||||
public function set_maximum_number_members(int $maximum_number_members){
|
||||
$this->maximum_number_members = $maximum_number_members;
|
||||
}
|
||||
|
||||
public function has_maximum_number_members() : bool {
|
||||
return $this->maximum_number_members > 0;
|
||||
}
|
||||
|
||||
public function get_maximum_number_members() : int {
|
||||
return $this->maximum_number_members;
|
||||
}
|
||||
|
||||
|
||||
//Get Set Signal Server name
|
||||
public function set_signal_server_name(string $signal_server_name){
|
||||
$this->signal_server_name = $signal_server_name == "" ? null : $signal_server_name;
|
||||
|
@ -19,6 +19,7 @@ $config->set("calls", false);
|
||||
/*
|
||||
$config->set("calls", array(
|
||||
"enabled" => true,
|
||||
"maximum_number_members" => 2,
|
||||
"signal_server_name" => "localhost",
|
||||
"signal_server_port" => 8081,
|
||||
"is_signal_server_secure" => false,
|
||||
|
Loading…
Reference in New Issue
Block a user