ish_models 0.0.33.303 → 0.0.33.304
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/office/email_message.rb +7 -7
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '069e59f9305d7133032ef2b6776d9cefd59f376d40774828a21b5b95c5acd7b9'
|
4
|
+
data.tar.gz: a556f13344b589b0add0b7c0f81408f0c9c55a89f902cfa855b7b29171182769
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9ab4766a82cd464fef564632d3fade497a5bb4542d0c472c2089fcf99cd657462d68b0c463b5800486d47a51613c2952d290b78fba7adcc080d713a508d119e
|
7
|
+
data.tar.gz: d21d6f7d92307efd7338bd86dd3b1fc1f0f3c9bc254c7b2ee00da15c5cf8193c1ac4aa5ea46d47d21f02fae2c1283b69553ac37f84f38ce1ae5d9615e1b0ff17
|
data/lib/office/email_message.rb
CHANGED
@@ -174,7 +174,7 @@ class Office::EmailMessage
|
|
174
174
|
if content_type.include? 'image'
|
175
175
|
photo = Photo.new({
|
176
176
|
content_type: content_type,
|
177
|
-
email_message_id:
|
177
|
+
email_message_id: self.id,
|
178
178
|
image_data: att.body.encoded,
|
179
179
|
original_filename: att.content_type_parameters[:name],
|
180
180
|
})
|
@@ -186,14 +186,14 @@ class Office::EmailMessage
|
|
186
186
|
attachment = Office::EmailAttachment.new({
|
187
187
|
content: att.body.decoded,
|
188
188
|
content_type: att.content_type,
|
189
|
-
email_message:
|
189
|
+
email_message: self,
|
190
190
|
filename: filename,
|
191
191
|
})
|
192
192
|
begin
|
193
193
|
attachment.save
|
194
194
|
rescue Encoding::UndefinedConversionError
|
195
|
-
|
196
|
-
|
195
|
+
self.logs.push "Could not save an attachment"
|
196
|
+
self.save
|
197
197
|
end
|
198
198
|
|
199
199
|
sio = StringIO.new att.body.decoded
|
@@ -201,13 +201,13 @@ class Office::EmailMessage
|
|
201
201
|
f.puts(sio.read)
|
202
202
|
end
|
203
203
|
asset3d = ::Gameui::Asset3d.new({
|
204
|
-
email_message:
|
204
|
+
email_message: self,
|
205
205
|
filename: filename,
|
206
206
|
object: File.open("/tmp/#{filename}"),
|
207
207
|
})
|
208
208
|
if !asset3d.save
|
209
|
-
|
210
|
-
|
209
|
+
self.logs.push "Could not save an asset3d"
|
210
|
+
self.save
|
211
211
|
end
|
212
212
|
|
213
213
|
end
|