contact_sync 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/contact_sync/syncable.rb +7 -2
- data/lib/contact_sync/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d7e2632d78edc304ce55bb522d0d22c4c451bdb2
|
4
|
+
data.tar.gz: 355afb2bf1de22cd0360d43cb1bb05b791b6f92c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 274c01fa9040a347f8caf9049113a24ddb3e1759aaef69ae1e5907a558687c55d1ebed971d597225f8081c52e555d0a3e6cc2ec109e16083e8ab8d345134439d
|
7
|
+
data.tar.gz: 1558c175e9d32c92f041830ee8eaaf0f542d65eda367c7cf6930635c78efa7c37542cacbbbf289d8817c98cea95a3fa6288e3f50a86585fd53c8c77f2208a534
|
@@ -89,28 +89,33 @@ module ContactSync
|
|
89
89
|
other_contacts = []
|
90
90
|
|
91
91
|
self.contacts.includes([:emails, :phones]) do |aKon|
|
92
|
+
#Check Phones to Match existing users.
|
92
93
|
aKon.phones.each do |ph|
|
93
94
|
matches = false
|
95
|
+
binding.pry
|
94
96
|
u = User.where(encrypted_number: ph.number.encrypt(:symmetric)).limit(1).first
|
95
97
|
if !u.blank?
|
96
98
|
matches = true
|
99
|
+
binding.pry
|
97
100
|
matched_users << {user: u.id, phone: ph.id, contact: aKon.id}
|
98
101
|
end
|
99
102
|
end
|
103
|
+
#Check Emails to Match existing users.
|
100
104
|
aKon.emails.each do |em|
|
105
|
+
binding.pry
|
101
106
|
u = User.where(email: mail.email).limit(1).first
|
102
107
|
if !u.blank?
|
108
|
+
binding.pry
|
103
109
|
matches = true
|
104
110
|
matched_users << {user: u.id, email: em.id, contact: aKon.id}
|
105
111
|
end
|
106
112
|
end
|
113
|
+
binding.pry
|
107
114
|
other_contacts << aKon if !matches
|
108
115
|
end
|
109
116
|
return {matched_users: matched_users, other_contacts: other_contacts}
|
110
117
|
end
|
111
118
|
|
112
|
-
|
113
|
-
|
114
119
|
# def matched_contacts
|
115
120
|
# matched_contacts = []
|
116
121
|
# user_phones = []
|
data/lib/contact_sync/version.rb
CHANGED