|
|
@ -1966,10 +1966,10 @@ any '/api' => sub { |
|
|
|
# Room persistence can only be set by admins |
|
|
|
# Room persistence can only be set by admins |
|
|
|
if ($req->{param}->{persistent} ne '' && |
|
|
|
if ($req->{param}->{persistent} ne '' && |
|
|
|
$self->key_can_do_this({token => $token, action => 'set_persistent'})){ |
|
|
|
$self->key_can_do_this({token => $token, action => 'set_persistent'})){ |
|
|
|
$room->{persistent} = ($req->{param}->{persistent} eq Mojo::JSON::true) ? '1' : '0'; |
|
|
|
$room->{persistent} = ($req->{param}->{persistent}) ? '1' : '0'; |
|
|
|
} |
|
|
|
} |
|
|
|
foreach my $pass (qw/join_password owner_password/){ |
|
|
|
foreach my $pass (qw/join_password owner_password/){ |
|
|
|
if ($req->{param}->{$pass} eq Mojo::JSON::false){ |
|
|
|
if ($req->{param}->{$pass} eq "\0"){ |
|
|
|
$room->{$pass} = undef; |
|
|
|
$room->{$pass} = undef; |
|
|
|
} |
|
|
|
} |
|
|
|
elsif ($req->{param}->{$pass} ne ''){ |
|
|
|
elsif ($req->{param}->{$pass} ne ''){ |
|
|
|