ishapi 0.1.8.307 → 0.1.8.308

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
  SHA256:
3
- metadata.gz: ddd9993a231d5fa7e5124886794d99afe3e8c5b101b3f38c93e86053ca57ba57
4
- data.tar.gz: 6fcf6829d0dd86abeedef28fddc382dd1449a1aef91b081fc4468dbc2987b442
3
+ metadata.gz: d2c02f71e6adddb15a1722d560e9a8b9f56a5a10daa82471cb60bc9b9399000f
4
+ data.tar.gz: a3d36b4b360ddf7285ce4950e9d5adb9a784beff39117c4b37a23914234d490c
5
5
  SHA512:
6
- metadata.gz: e16e4c44484b581fac511854fa67efde229173288908ce45b6cb5e271ac0e890a66bfd6338a90919d0ddad6ebd637dc11b4be01cc9a22d0ef93ca4eb39d99ad5
7
- data.tar.gz: 18061bb332133a4f4f4358d5aa35f05cbace58242ca234d3285e7ec2c1dc4e09fdadf020743156a20e29d3dbdd42580213948a7b6e648fafe5b06741ff3da836
6
+ metadata.gz: 24949079b8dae5559f5046e42e693610ae5943f9a81fd4e461ee7fa1310998dff2120d60ceaf26b64356bd2d46a98168c0dc9c03e1958f1d4355f9d5a0fd5898
7
+ data.tar.gz: fc860e2a11a220c176cd5c67f0d0ce7766f6198dbac1fd50be0cdb4b7fdec44c315587f134e355273413b507c723e70515520772db9101be01233461bfba15bb
@@ -41,14 +41,10 @@ class Ishapi::EmailMessageIntakeJob < Ishapi::ApplicationJob
41
41
  message_id = the_mail.header['message-id'].decoded
42
42
  in_reply_to_id = the_mail.header['in-reply-to']&.to_s
43
43
  email_inbox_tag_id = WpTag.emailtag(WpTag::INBOX).id
44
-
45
- if !the_mail.to
46
- the_mail.to = [ 'NO-RECIPIENT' ]
47
- end
48
-
44
+ the_mail.to = [ 'NO-RECIPIENT' ] if !the_mail.to
49
45
 
50
46
  subject = ::Msg.strip_emoji the_mail.subject
51
- subject ||= '(wco no subject)'
47
+ subject ||= '(wco-no-subject)'
52
48
 
53
49
 
54
50
  ## Conversation
@@ -79,7 +75,6 @@ class Ishapi::EmailMessageIntakeJob < Ishapi::ApplicationJob
79
75
  in_reply_to_id: in_reply_to_id,
80
76
 
81
77
  object_key: stub.object_key,
82
- # object_path: stub.object_path,
83
78
 
84
79
  subject: subject,
85
80
  date: the_mail.date,
@@ -92,8 +87,6 @@ class Ishapi::EmailMessageIntakeJob < Ishapi::ApplicationJob
92
87
 
93
88
  cc: the_mail.cc ? the_mail.cc[0] : nil,
94
89
  ccs: the_mail.cc,
95
-
96
- # bccs: the_mail.bcc,
97
90
  })
98
91
  if !@message.persisted?
99
92
  throw "Could not create email_message: #{@message.errors.full_messages.join(', ')} ."
@@ -159,6 +152,10 @@ class Ishapi::EmailMessageIntakeJob < Ishapi::ApplicationJob
159
152
  end
160
153
  end
161
154
 
155
+ if !@message.save
156
+ puts! @message.errors.full_messages.join(", "), "Could not save @message"
157
+ end
158
+
162
159
  ## Leadset, Lead
163
160
  domain = @message.from.split('@')[1] rescue 'unknown.domain'
164
161
  leadset = Leadset.find_or_create_by( company_url: domain )
@@ -194,7 +191,7 @@ class Ishapi::EmailMessageIntakeJob < Ishapi::ApplicationJob
194
191
 
195
192
  # || MiaTagger.analyze( @message.part_html, :is_spammy_recruite ).score > .5
196
193
 
197
- puts! "applying filter #{filter} to conv #{conv}" if DEBUG
194
+ # puts! "applying filter #{filter} to conv #{conv}" if DEBUG
198
195
 
199
196
  @message.apply_filter( filter )
200
197
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ishapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8.307
4
+ version: 0.1.8.308
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox