ish_models 0.0.33.291 → 0.0.33.292
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: 8106a24a63e76e7d3905e8412c43d2725ea74ccc2e7ec16f8fc9957f1ab2db89
|
4
|
+
data.tar.gz: b2f9624e52ab4087e8e03fc2ba259b48dacee46398dc0826f898b3dc216bb7c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7aa35e292ef1b467e8d57b22795742ceed93d14c43bb4774fe0bd6646c9b73691a72b03bec3461a9786516e1d9d15b19fdf8d24622cc4c935b81449bd0b8b46
|
7
|
+
data.tar.gz: d7b5656b4e08cc5d8dd1ba9da5d9dbe9a1980d74fa4c73607aefdfeb790a33cc8ed018c0c7e1c31185540f0f71f3d01c5ff61b70c0a3878a22d39ca5728542bb
|
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.292
|
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
|