1
0
mirror of https://github.com/dani/vroom.git synced 2024-06-26 17:43:29 +02:00

Fix owner authenticating through the authenticate api method

This commit is contained in:
Daniel Berteaud 2015-03-18 17:47:03 +01:00
parent 15c3980792
commit 188d333098

View File

@ -1749,6 +1749,11 @@ any '/api' => sub {
# Auth succeed ? lets promote him to owner of the room
if ($room->{owner_password} && Crypt::SaltedHash->validate($room->{owner_password}, $pass)){
$self->session($room->{name}, {role => 'owner'});
$self->set_peer_role({
room => $room->{name},
peer_id => $self->session('peer_id'),
role => 'owner'
});
$self->associate_key_to_room(
room => $room->{name},
key => $self->session('key'),