Fix log message when setting peer role in the database

master
Daniel Berteaud 11 years ago
parent 64fdb9bf33
commit 5848938f08
  1. 2
      public/vroom.pl

@ -286,7 +286,7 @@ helper set_peer_role => sub {
return undef if ($sth->rows > 0); return undef if ($sth->rows > 0);
$sth = eval { $self->db->prepare("UPDATE `participants` SET `peer_id`=?,`role`=? WHERE `participant`=? AND `id` IN (SELECT `id` FROM `rooms` WHERE `name`=?)") } || return undef; $sth = eval { $self->db->prepare("UPDATE `participants` SET `peer_id`=?,`role`=? WHERE `participant`=? AND `id` IN (SELECT `id` FROM `rooms` WHERE `name`=?)") } || return undef;
$sth->execute($id,$role,$name,$room) || return undef; $sth->execute($id,$role,$name,$room) || return undef;
$self->app->log->info("User $id has now the $role role in room $name"); $self->app->log->info("User $name (peer id $id) has now the $role role in room $room");
return 1; return 1;
}; };

Loading…
Cancel
Save