ish_models 0.0.33.291 → 0.0.33.293
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ish_models.rb +1 -0
- data/lib/office/email_action.rb +6 -0
- data/lib/office/email_attachment.rb +12 -0
- data/lib/office/email_conversation.rb +3 -0
- data/lib/office/email_message.rb +2 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5850b835df40eb594cce94b7014ef67d33a2671103c8e67fd2cf9bd166437ca9
|
4
|
+
data.tar.gz: befe8e46fa6c5451464946185bbd5f8278040d44510efc97e1d052074bf17c91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19ecead452085f2305a1cbdeb239eb36922c46840e0284b9e175a311bc82de6b02a05fc0813cf4074fb83615a388bab220ae3dfe101f0da43ecf23ebbb0f0a31
|
7
|
+
data.tar.gz: 0e1725c9aee5bd32c332d31fffaa60f4aff7b87c6412bc9d5c66b3f2e5142261d64c519d681a5d946949a23574341eb56b85b448bbd81cbfa6aa6116b2968e4d
|
data/lib/ish_models.rb
CHANGED
@@ -68,6 +68,7 @@ require 'office/action_tie'
|
|
68
68
|
require 'office/admin_message'
|
69
69
|
require 'office/email_action'
|
70
70
|
require 'office/email_action_tie'
|
71
|
+
require 'office/email_attachment'
|
71
72
|
require 'office/email_conversation'
|
72
73
|
require 'office/email_conversation_lead'
|
73
74
|
require 'office/email_conversation_tag'
|
data/lib/office/email_action.rb
CHANGED
@@ -24,5 +24,11 @@ class Office::EmailAction
|
|
24
24
|
|
25
25
|
has_many :email_filters, class_name: 'Office::EmailFilter', inverse_of: :email_action
|
26
26
|
|
27
|
+
field :deleted_at, default: nil, type: :time
|
28
|
+
|
29
|
+
def self.list
|
30
|
+
[[nil,nil]] + Office::EmailAction.where({ :deleted_at => nil }).map { |a| [ a.slug, a.id ] }
|
31
|
+
end
|
32
|
+
|
27
33
|
end
|
28
34
|
EAct = Office::EmailAction
|
@@ -0,0 +1,12 @@
|
|
1
|
+
|
2
|
+
class Office::EmailAttachment
|
3
|
+
include Mongoid::Document
|
4
|
+
include Mongoid::Timestamps
|
5
|
+
|
6
|
+
belongs_to :email_message, class_name: 'Office::EmailMessage', inverse_of: :email_attachments
|
7
|
+
|
8
|
+
field :content
|
9
|
+
field :content_type
|
10
|
+
field :filename
|
11
|
+
|
12
|
+
end
|
@@ -10,10 +10,13 @@ class Office::EmailConversation
|
|
10
10
|
field :state
|
11
11
|
|
12
12
|
field :subject
|
13
|
+
index({ subject: -1 })
|
14
|
+
|
13
15
|
field :latest_at
|
14
16
|
index({ latest_at: -1 })
|
15
17
|
|
16
18
|
field :from_emails, type: :array, default: []
|
19
|
+
index({ from_emails: -1 })
|
17
20
|
|
18
21
|
has_many :lead_ties, class_name: 'Office::EmailConversationLead'
|
19
22
|
# def lead_ids
|
data/lib/office/email_message.rb
CHANGED
@@ -51,6 +51,8 @@ class Office::EmailMessage
|
|
51
51
|
email_conversation
|
52
52
|
end
|
53
53
|
|
54
|
+
has_many :email_attachments, class_name: 'Office::EmailAttachment', inverse_of: :email_message
|
55
|
+
|
54
56
|
def preview_str
|
55
57
|
body = part_html || part_html || 'Neither part_html nor part_txt!'
|
56
58
|
body = ::ActionView::Base.full_sanitizer.sanitize( body ).gsub(/\s+/, ' ')
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ish_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.33.
|
4
|
+
version: 0.0.33.293
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
@@ -218,6 +218,7 @@ files:
|
|
218
218
|
- lib/office/admin_message.rb
|
219
219
|
- lib/office/email_action.rb
|
220
220
|
- lib/office/email_action_tie.rb
|
221
|
+
- lib/office/email_attachment.rb
|
221
222
|
- lib/office/email_conversation.rb
|
222
223
|
- lib/office/email_conversation_lead.rb
|
223
224
|
- lib/office/email_conversation_tag.rb
|