From dcb5369c4872e514cadf3deed190a678de99b0be Mon Sep 17 00:00:00 2001 From: Vishnu Narayanan Date: Thu, 14 Nov 2024 23:41:52 +0530 Subject: [PATCH] chore: log account_id --- app/channels/room_channel.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/channels/room_channel.rb b/app/channels/room_channel.rb index d6cd7d8de..10f91e717 100644 --- a/app/channels/room_channel.rb +++ b/app/channels/room_channel.rb @@ -11,8 +11,10 @@ class RoomChannel < ApplicationCable::Channel end def log_params - inbox_id = ContactInbox.find_by(pubsub_token: params[:pubsub_token])&.inbox_id - Rails.logger.info("update_presence: #{params.inspect}, inbox_id: #{inbox_id}") + contact_inbox = ContactInbox.find_by(pubsub_token: params[:pubsub_token]) + inbox_id = contact_inbox&.inbox_id + account_id = contact_inbox&.inbox&.account_id + Rails.logger.info("update_presence: #{params.inspect}, inbox_id: #{inbox_id}, account_id: #{account_id}") end def update_presence