From bca694f9f86e1958d86fddc97f7b7658b840fc8d Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Mon, 10 Nov 2025 15:34:42 -0500 Subject: [PATCH] Fix action cable connection --- app/channels/application_cable/connection.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/channels/application_cable/connection.rb b/app/channels/application_cable/connection.rb index a01c27bc2..27c5ee548 100644 --- a/app/channels/application_cable/connection.rb +++ b/app/channels/application_cable/connection.rb @@ -3,16 +3,14 @@ module ApplicationCable identified_by :current_user def connect - super set_current_user || reject_unauthorized_connection end private def set_current_user if session = find_session_by_cookie - # # TODO:PLANB: not sure how to fix this - # membership = session.identity.memberships.find_by!(tenant: current_tenant) - # self.current_user = membership.user if membership.user.active? + membership = session.identity.memberships.find_by!(tenant: request.env["fizzy.external_account_id"]) + self.current_user = membership.user if membership.user.active? end end