fix: Add validations dynamically for pre-chat form (#1779)
This commit is contained in:
@@ -7,7 +7,7 @@ class Api::V1::Widget::ConversationsController < Api::V1::Widget::BaseController
|
||||
|
||||
def create
|
||||
ActiveRecord::Base.transaction do
|
||||
update_contact(contact_email) if @contact.email.blank?
|
||||
update_contact(contact_email) if @contact.email.blank? && contact_email.present?
|
||||
@conversation = create_conversation
|
||||
conversation.messages.create(message_params)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user