filter orphan conversations
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user