filter orphan conversations

This commit is contained in:
Tanmay Deep Sharma
2026-01-20 17:34:47 +05:30
parent 78e78f6ef6
commit f7ab3a689c
3 changed files with 12 additions and 6 deletions
@@ -160,6 +160,9 @@ class Api::V1::Accounts::ConversationsController < Api::V1::Accounts::BaseContro
def conversation
@conversation ||= Current.account.conversations.find_by!(display_id: params[:id])
# Return 404 if conversation has no valid contact or contact_inbox
raise ActiveRecord::RecordNotFound if @conversation.contact.blank?
authorize @conversation, :show?
end