wco_models 3.1.0.259 → 3.1.0.260
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 +4 -4
- data/app/models/wco_email/message.rb +19 -19
- data/app/models/wco_email/message_stub.rb +4 -1
- 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: 8fe55fca6664d99d5a16d48659d49c3694befa4051efdfdda3cb69c32b088158
|
|
4
|
+
data.tar.gz: 1cb36dc5b19a07a7f3b0997c851ad56a82a1591df4eb47bfaa1fce7c1bb564c4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c3d8857b2521bdfd4995564efaaf9ecd10bc808f0c1147b27abc07fcaa261c56280348be319007d1f55c5132fa7dd97d8610558212e15d384f42c8fd01b52e0e
|
|
7
|
+
data.tar.gz: 459577ea9d35bda5a097c7330aacadc69e1672ed447369314e80da9ba4d5b20be0a1ed37ffa0658703ac00d2a6fa3289eb1a184ed61af8c7e247e0ad8d180eeb
|
|
@@ -83,26 +83,26 @@ class WcoEmail::Message
|
|
|
83
83
|
has_many :photos, class_name: '::Wco::Photo'
|
|
84
84
|
has_many :replies, class_name: '::WcoEmail::Context', inverse_of: :reply_to_message
|
|
85
85
|
|
|
86
|
-
def
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
86
|
+
def apply_filter_action action
|
|
87
|
+
message = self
|
|
88
|
+
|
|
89
|
+
case action.kind
|
|
90
|
+
when WcoEmail::EmailFilterAction::KIND_OAT
|
|
91
|
+
|
|
92
|
+
config = {
|
|
93
|
+
'email_message_id' => message.id.to_s,
|
|
94
|
+
'lead_id' => message.lead_id.to_s,
|
|
95
|
+
# 'message_id' => message.id.to_s,
|
|
96
|
+
'stub_id' => message.stub_id.to_s,
|
|
97
|
+
}
|
|
98
|
+
oa = Wco::OfficeAction.create!({
|
|
99
|
+
office_action_template: action.aject,
|
|
100
|
+
status: 'active',
|
|
101
|
+
perform_at: Time.now,
|
|
102
|
+
config: config,
|
|
103
|
+
})
|
|
104
|
+
|
|
104
105
|
|
|
105
|
-
end
|
|
106
106
|
end
|
|
107
107
|
end
|
|
108
108
|
|
|
@@ -170,7 +170,10 @@ class WcoEmail::MessageStub
|
|
|
170
170
|
if skip_reason
|
|
171
171
|
puts! "NOT Applying filter #{filter} to conv #{@message.conversation} for matching #{skip_reason}" if DEBUG
|
|
172
172
|
else
|
|
173
|
-
@
|
|
173
|
+
@conv.filter = filter; @conv.save
|
|
174
|
+
filter.actions.each do |action|
|
|
175
|
+
@message.apply_filter_action( action )
|
|
176
|
+
end
|
|
174
177
|
end
|
|
175
178
|
end
|
|
176
179
|
end
|