diff --git a/lib/SeMeet/Schema/Result/User.pm b/lib/SeMeet/Schema/Result/User.pm index 23d3ff62b1dc27fd339ce8b3ccabeff13eb14604..e630aeb4e4ff6a4385b9da5e6c2a886520ba21e2 100644 --- a/lib/SeMeet/Schema/Result/User.pm +++ b/lib/SeMeet/Schema/Result/User.pm @@ -73,13 +73,9 @@ sub meet_token { '.jpg', ); - my $moderator = 0; - -# $moderator = 1 if $meet->owner_id == $self->id; - - $moderator ||= $meet->meet_users({ - id => $self->id, - is_moderator => 't', + my $moderator = $meet->meet_users({ + user_id => $self->id, + is_moderator => 1, })->count; return Mojo::JWT->new(