webhook: make helpscout email search case-insensitive

Fix #3636
This commit is contained in:
Pierre de La Morinerie 2019-03-19 15:49:54 +01:00
parent cc544f0816
commit 36f9909066

View file

@ -2,7 +2,7 @@ class WebhookController < ActionController::Base
before_action :verify_signature!, only: :helpscout before_action :verify_signature!, only: :helpscout
def helpscout def helpscout
email = params[:customer][:email] email = params[:customer][:email].downcase
user = User.find_by(email: email) user = User.find_by(email: email)
gestionnaire = Gestionnaire.find_by(email: email) gestionnaire = Gestionnaire.find_by(email: email)
administrateur = Administrateur.find_by(email: email) administrateur = Administrateur.find_by(email: email)