diff --git a/app/channels/application_cable/connection.rb b/app/channels/application_cable/connection.rb index 2f04326793f1..94b9a8b976e7 100644 --- a/app/channels/application_cable/connection.rb +++ b/app/channels/application_cable/connection.rb @@ -11,7 +11,7 @@ def connect def find_verified_user return reject_unauthorized_connection unless cookies[:ws_token] userid = TokenManager.new('ws').token_get_info(cookies[:ws_token], :userid) - if current_user = User.find_by(:userid => userid) + if current_user = User.find_by(:userid => userid.presence) current_user else reject_unauthorized_connection