|
|
@ -50,6 +50,7 @@ $config->{'cookie.name'} ||= 'vroom'; |
|
|
|
$config->{'rooms.inactivity_timeout'} ||= 60; |
|
|
|
$config->{'rooms.inactivity_timeout'} ||= 60; |
|
|
|
$config->{'rooms.reserved_inactivity_timeout'} ||= 86400; |
|
|
|
$config->{'rooms.reserved_inactivity_timeout'} ||= 86400; |
|
|
|
$config->{'rooms.common_names'} ||= ''; |
|
|
|
$config->{'rooms.common_names'} ||= ''; |
|
|
|
|
|
|
|
$config->{'rooms.max_members'} ||= 0; |
|
|
|
$config->{'log.level'} ||= 'info'; |
|
|
|
$config->{'log.level'} ||= 'info'; |
|
|
|
$config->{'etherpad.uri'} ||= ''; |
|
|
|
$config->{'etherpad.uri'} ||= ''; |
|
|
|
$config->{'etherpad.api_key'} ||= ''; |
|
|
|
$config->{'etherpad.api_key'} ||= ''; |
|
|
@ -919,6 +920,7 @@ helper signal_broadcast_room => sub { |
|
|
|
# ecept the sender himself |
|
|
|
# ecept the sender himself |
|
|
|
foreach my $peer (keys %$peers){ |
|
|
|
foreach my $peer (keys %$peers){ |
|
|
|
next if ($peer eq $data->{from}); |
|
|
|
next if ($peer eq $data->{from}); |
|
|
|
|
|
|
|
next if !$peers->{$data->{from}}->{room}; |
|
|
|
next if !$peers->{$peer}->{room}; |
|
|
|
next if !$peers->{$peer}->{room}; |
|
|
|
next if $peers->{$peer}->{room} ne $peers->{$data->{from}}->{room}; |
|
|
|
next if $peers->{$peer}->{room} ne $peers->{$data->{from}}->{room}; |
|
|
|
$peers->{$peer}->{socket}->send($data->{msg}); |
|
|
|
$peers->{$peer}->{socket}->send($data->{msg}); |
|
|
@ -977,6 +979,14 @@ websocket '/socket.io/:ver/websocket/:id' => sub { |
|
|
|
$self->finish; |
|
|
|
$self->finish; |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
# Are we under the limit of members ? |
|
|
|
|
|
|
|
elsif ($config->{'rooms.max_members'} > 0 && $self->get_room_members($room) >= $config->{'rooms.max_members'}){ |
|
|
|
|
|
|
|
$self->app->log->debug("Failed to connect to the signaling channel, members limit (" . $config->{'rooms.max_members'} . |
|
|
|
|
|
|
|
") is reached"); |
|
|
|
|
|
|
|
$self->send( Protocol::SocketIO::Message->new( type => 'disconnect' ) ); |
|
|
|
|
|
|
|
$self->finish; |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
# We build a list of peers, except this new one so we can send it |
|
|
|
# We build a list of peers, except this new one so we can send it |
|
|
|
# to the new peer, and he'll be able to contact all those peers |
|
|
|
# to the new peer, and he'll be able to contact all those peers |
|
|
|
my $others = {}; |
|
|
|
my $others = {}; |
|
|
@ -1971,6 +1981,14 @@ get '/:room' => sub { |
|
|
|
ownerPass => ($data->{owner_password}) ? '1':'0' |
|
|
|
ownerPass => ($data->{owner_password}) ? '1':'0' |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
# If we've reached the members' limit |
|
|
|
|
|
|
|
if ($config->{'rooms.max_members'} > 0 && $self->get_room_members($room) >= $config->{'rooms.max_members'}){ |
|
|
|
|
|
|
|
return $self->render('error', |
|
|
|
|
|
|
|
msg => $self->l("ERROR_TOO_MANY_MEMBERS"), |
|
|
|
|
|
|
|
err => 'ERROR_TOO_MANY_MEMBERS', |
|
|
|
|
|
|
|
room => $room, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
# Now, if the room is password protected and we're not a participant, nor the owner, lets prompt for the password |
|
|
|
# Now, if the room is password protected and we're not a participant, nor the owner, lets prompt for the password |
|
|
|
# Email invitation have a token which can be used instead of password |
|
|
|
# Email invitation have a token which can be used instead of password |
|
|
|
if ($data->{join_password} && |
|
|
|
if ($data->{join_password} && |
|
|
|