From 41d1282e4b21194114707955d636044846eae881 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 21 Jan 2015 19:02:00 +0100 Subject: [PATCH] Fix promoting peer --- vroom.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vroom.pl b/vroom.pl index 85b75e2..960099a 100755 --- a/vroom.pl +++ b/vroom.pl @@ -1494,7 +1494,7 @@ any '/api' => sub { # If we just have been promoted to owner if ($self->session($room->{name})->{role} ne 'owner' && $self->get_peer_role({room => $room->{name}, peer_id => $peer_id}) eq 'owner'){ - $self->session($room)->{role} = 'owner'; + $self->session($room->{name})->{role} = 'owner'; $self->associate_key_to_room( room => $room->{name}, key => $self->session('key'), @@ -1564,7 +1564,7 @@ any '/api' => sub { # Promote a participant to be owner of a room elsif ($req->{action} eq 'promote_peer'){ my $peer_id = $req->{param}->{peer_id}; - if ($peer_id && $self->promote_peer({room => $room, peer_id => $peer_id})){ + if ($peer_id && $self->promote_peer({room => $room->{name}, peer_id => $peer_id})){ return $self->render( json => { status => 'success',