mass-client 1.0.18 → 1.0.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/first-line/profile_mta.rb +31 -27
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 226f48f9298fc4e264e311c3544c19935e985a9d5bab26b11740ceba9770fec7
4
- data.tar.gz: 0a5943bb27e3a9b58e212ab4929dec83462712fb9614edb2019458065d53b22c
3
+ metadata.gz: 8606bfe0664c8ac8cf9f5af547b4925ff5982957da2842e1650caba3d974c02e
4
+ data.tar.gz: 0f72b71d5f681333ad318f23c1d27cc89267dc7a765ab72dc49d74e04356b6bd
5
5
  SHA512:
6
- metadata.gz: a91705cfe04215ec98a8d2418dc87fad48fb724fc0e60a6a80d52de28f2b6631a3e88d5047673fa583d0eba9630c2fe5e917ee0f382d748f1182f79f8020d85c
7
- data.tar.gz: cf042ef9442239c66aecf000392b315d804c662d0f240e79125ef90109471f28da072da178ff0069cc9ee1602f5d3d2b0c6e97b63f1eca3be4e3b644d2205abe
6
+ metadata.gz: d9506f4eb6db0fb7dd2785efc503ee239b33764e6cf1d0643099ab3ce9f913bdf00e280b1301288fe069f97db6d9ed50a1c358c5e57bd7254f753355be0b773f
7
+ data.tar.gz: 7fce26002d9e2acf148330f23bb5c2ca4ced10fdcbf760b1e3d1286d35aa14bafff2f3057dc8fbe56f48b0f34894aff69263afdaff2670ebf1322d4aa5048011
@@ -91,7 +91,6 @@ module Mass
91
91
  # l.logf "Instantly warming email".red
92
92
  else
93
93
  lead_email = envelope.from[0].mailbox.to_s + '@' + envelope.from[0].host.to_s
94
-
95
94
  lead_name = envelope.from[0].name
96
95
  subject = envelope.subject
97
96
  body = imap.fetch(id, "BODY[]")[0].attr["BODY[]"]
@@ -101,33 +100,38 @@ module Mass
101
100
  #is_bounce = !rep.nil?
102
101
  #bounce_reason = rep[0].reason if rep
103
102
  #bounce_diagnosticcode = rep[0].diagnosticcode if rep
104
-
105
- h = {
106
- # a scraped message is always a :performed message
107
- 'status' => :performed,
108
- # what is the outreach type?
109
- # e.g.: :LinkedIn_DirectMessage
110
- # decide this in the child class.
111
- 'outreach_type' => :GMail_DirectMessage,
112
- # hash descriptor of the profile who is scraping the inbox
113
- 'profile' => p.desc,
114
- # hash descriptor of the lead who is the conversation partner
115
- 'lead_or_company' => {
116
- 'name' => lead_name,
117
- 'email' => lead_email,
118
- },
119
- # if the message has been sent by the profile, it is :outgoing.
120
- # if the message has been sent by the lead, it is :incoming.
121
- 'direction' => :incoming,
122
- # the content of the message
123
- 'subject' => subject,
124
- 'body' => body,
125
- 'message_id' => message_id,
126
- 'reply_to_message_id' => reply_to_message_id,
127
- }
128
- ret << h
129
103
 
130
- l.logf "done".green
104
+ if lead_name.nil?
105
+ l.skip(details: "lead_name is nil")
106
+ elsif lead_email.nil?
107
+ l.skip(details: "lead_email is nil")
108
+ else
109
+ h = {
110
+ # a scraped message is always a :performed message
111
+ 'status' => :performed,
112
+ # what is the outreach type?
113
+ # e.g.: :LinkedIn_DirectMessage
114
+ # decide this in the child class.
115
+ 'outreach_type' => :GMail_DirectMessage,
116
+ # hash descriptor of the profile who is scraping the inbox
117
+ 'profile' => p.desc,
118
+ # hash descriptor of the lead who is the conversation partner
119
+ 'lead_or_company' => {
120
+ 'name' => lead_name,
121
+ 'email' => lead_email,
122
+ },
123
+ # if the message has been sent by the profile, it is :outgoing.
124
+ # if the message has been sent by the lead, it is :incoming.
125
+ 'direction' => :incoming,
126
+ # the content of the message
127
+ 'subject' => subject,
128
+ 'body' => body,
129
+ 'message_id' => message_id,
130
+ 'reply_to_message_id' => reply_to_message_id,
131
+ }
132
+ ret << h
133
+ l.logf "done".green
134
+ end
131
135
  end
132
136
  }
133
137
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mass-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.18
4
+ version: 1.0.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leandro Daniel Sardi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-09-09 00:00:00.000000000 Z
11
+ date: 2024-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: timeout