From 188d333098849c94c80dd62fd0bc6a99ce9a8b92 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 18 Mar 2015 17:47:03 +0100 Subject: [PATCH] Fix owner authenticating through the authenticate api method --- vroom.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vroom.pl b/vroom.pl index c4a8e1a..fad8b81 100755 --- a/vroom.pl +++ b/vroom.pl @@ -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'),