Fix invitations handling

master
Daniel Berteaud 10 years ago
parent 2b5f5208e6
commit eda5ada45b
  1. 4
      vroom.pl

@ -1038,10 +1038,10 @@ get '/kicked/(:room)' => sub {
get '/invitation' => sub { get '/invitation' => sub {
my $self = shift; my $self = shift;
my $inviteId = $self->param('token') || ''; my $inviteId = $self->param('token') || '';
# Delecte expired invitation now # Delete expired invitation now
$self->delete_invitations; $self->delete_invitations;
my $invite = $self->get_invitation($inviteId); my $invite = $self->get_invitation($inviteId);
my $room = $self->get_room_by_id($invite->{id}); my $room = $self->get_room_by_id($invite->{room_id});
if (!$invite || !$room){ if (!$invite || !$room){
return $self->render('error', return $self->render('error',
err => 'ERROR_INVITATION_INVALID', err => 'ERROR_INVITATION_INVALID',

Loading…
Cancel
Save