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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 942fbc5f9b671f08a5e9a09417acb71c5cb0dabc
4
- data.tar.gz: bdaa20a46869cb00faaba1fa2454afd8ff2c004d
3
+ metadata.gz: d7e2632d78edc304ce55bb522d0d22c4c451bdb2
4
+ data.tar.gz: 355afb2bf1de22cd0360d43cb1bb05b791b6f92c
5
5
  SHA512:
6
- metadata.gz: e7e8845320724c6cc4d94cd81969a16d1ff47d58c053be1a466424b811efed2581eab58eadd56e54de4b219cbf7bea0272f8df65b5ac4f4d89ba1c018f7ff313
7
- data.tar.gz: 07630da17c3809207a9d2b7608c32501fc2a9af58b3bfcefdc06d72bffbca157fdfe1b0840e6aa5ff74bc1c1e339c36550e98f675283b8dc0172897be3af47fd
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 = []
@@ -1,3 +1,3 @@
1
1
  module ContactSync
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contact_sync
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saad Masood