chore: Identify contacts based on phone number (#2134)

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This commit is contained in:
Sojan Jose
2021-04-20 22:42:14 +05:30
committed by GitHub
parent 98e20e8607
commit 3a4d316a9d
2 changed files with 48 additions and 3 deletions

View File

@@ -43,6 +43,8 @@ class ContactBuilder
contact ||= account.contacts.find_by(email: contact_attributes[:email]) if contact_attributes[:email].present?
contact ||= account.contacts.find_by(phone_number: contact_attributes[:phone_number]) if contact_attributes[:phone_number].present?
contact
end