feat: do not send contact details to the widget (#9223)
* refactor: use has_email instead of email * feat: remove usage of details directly in forms * test: update payload * test: fix transcript test * refactor: use computed hasEmail --------- Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
@@ -33,10 +33,10 @@ class Api::V1::Widget::ConversationsController < Api::V1::Widget::BaseController
|
||||
end
|
||||
|
||||
def transcript
|
||||
if permitted_params[:email].present? && conversation.present?
|
||||
if conversation.present? && conversation.contact.present? && conversation.contact.email.present?
|
||||
ConversationReplyMailer.with(account: conversation.account).conversation_transcript(
|
||||
conversation,
|
||||
permitted_params[:email]
|
||||
conversation.contact.email
|
||||
)&.deliver_later
|
||||
end
|
||||
head :ok
|
||||
|
||||
Reference in New Issue
Block a user