ishapi 0.1.8.225 → 0.1.8.227

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f039e56669ba4a45d064a5246fd73cb03f699578e0678a02f6259029fbfc654
4
- data.tar.gz: 680efaf51b9c82f06c9ee2e7dddca0bf2c67a2569348aacacfa20a21f540d104
3
+ metadata.gz: 909a6f982e7fee760e1f899877ad43e6f509e119bfec47b4c0b0345ba8866366
4
+ data.tar.gz: 40226de4cdd50d55da25fc56d23064c25d686c85166e8f031689dca2b32863af
5
5
  SHA512:
6
- metadata.gz: 44293d49ad88026b00781c3262ec34c44c53ba441e5f4bb44d5d3cd269eb4d42542c0cad9276be79eea9902d5601b864c8e64b60d991f89dd2fd1c9ebb954c2f
7
- data.tar.gz: 33a8a4833eff380bbe7e65ea9ec88d22c98f6b0fa606889f1ee492f783f2ec900b05707154831952c3a09a6ba9ce5cf7e6b9694abdf52c7d23fafc4a329d53d9
6
+ metadata.gz: abd509759143ee612cd8ea579cccf8147109fb3d6a321d136d387b397aecb1aba54497667b4122bced72a2863b8fb7059948d816252d308d983c78b5a30c0726
7
+ data.tar.gz: e6dd8d5408d964db039a61c6ab80d291eb0baa5cb17dd679d981a3f6bdea6e1105fbc2eaea2844bb409079f524c19fb47c6977bc0b3df4483648cd5663db91e9
@@ -13,12 +13,14 @@ class ::Ishapi::EmailMessagesController < ::Ishapi::ApplicationController
13
13
  if params[:load_images]
14
14
  ;
15
15
  else
16
- doc = Nokogiri::HTML(@msg.part_html)
17
- images = doc.search('img')
18
- images.each do |img|
19
- img['src'] = 'missing'
16
+ if @msg.part_html
17
+ doc = Nokogiri::HTML(@msg.part_html)
18
+ images = doc.search('img')
19
+ images.each do |img|
20
+ img['src'] = 'missing'
21
+ end
22
+ @msg.part_html = doc
20
23
  end
21
- @msg.part_html = doc
22
24
  end
23
25
 
24
26
  respond_to do |format|
@@ -94,6 +94,11 @@ class Ishapi::EmailMessageIntakeJob < Ishapi::ApplicationJob
94
94
  churn_subpart( @message, part )
95
95
  end
96
96
 
97
+ if the_mail.parts.length == 0
98
+ body = the_mail.body.decoded
99
+ @message.part_txt = body
100
+ end
101
+
97
102
  ## Conversation
98
103
  if in_reply_to_id
99
104
  in_reply_to_msg = ::Office::EmailMessage.where({ message_id: in_reply_to_id }).first
@@ -1,3 +1,10 @@
1
1
 
2
2
  %html
3
- %body{ style: 'background: white' }= raw @msg.part_html
3
+ %body{ style: 'background: white' }
4
+ - if @msg.part_html
5
+ = raw( @msg.part_html )
6
+ - elsif @msg.part_txt
7
+ %pre
8
+ = @msg.part_txt
9
+ - else
10
+ Neither part_html nor part_txt!
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.225
4
+ version: 0.1.8.227
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox