fix: Discard invalid contact attributes in widget conversation end point (#5664)

Fixes: chatwoot/product#601
This commit is contained in:
Muhsin Keloth
2022-10-19 01:46:29 +05:30
committed by GitHub
parent e34e975776
commit 2e7ab484bd
2 changed files with 25 additions and 1 deletions

View File

@@ -17,7 +17,8 @@ class Api::V1::Widget::ConversationsController < Api::V1::Widget::BaseController
@contact = ContactIdentifyAction.new(
contact: @contact,
params: { email: contact_email, phone_number: contact_phone_number, name: contact_name },
retain_original_contact_name: true
retain_original_contact_name: true,
discard_invalid_attrs: true
).perform
end