wco_models 3.1.0.273 → 3.1.0.275
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/email_filter_action.rb +7 -0
- data/app/models/wco_email/message.rb +10 -0
- 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: d5df9cb4bcb4f460b4cc64878583e88e60d82079b8bc0215a017eed561f7bd41
|
|
4
|
+
data.tar.gz: 8104ce3a762d78d9d11d15790feb8949ed5d5cec9c08515cc0f8eabca99412c1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 57173b9190a08c917608dd776ad1295bb3e191ec7ceb1f7db060e020860c08e8594fd6fd1c367dd433f9ef91730f4b6d835ded25d11667e1740da2c54d44eea0
|
|
7
|
+
data.tar.gz: 81b65826be767a52cf854d9abf484e16165bfac7ac3259a1d0ae40cbe88f870d50ab0b80fcc88687e5da509deaf7a7515db71288a4aec8a6825e75144de75a31
|
|
@@ -24,6 +24,13 @@ class WcoEmail::EmailFilterAction
|
|
|
24
24
|
belongs_to :aject, polymorphic: true # , optional: true # eg tag, EAT, OAT
|
|
25
25
|
accepts_nested_attributes_for :aject, allow_destroy: true, reject_if: :all_blank
|
|
26
26
|
# validates :aject_id, presence: true
|
|
27
|
+
def email_template
|
|
28
|
+
if aject.class == WcoEmail::EmailTemplate
|
|
29
|
+
return aject
|
|
30
|
+
else
|
|
31
|
+
throw 'this email_filter_action does not have an email_template'
|
|
32
|
+
end
|
|
33
|
+
end
|
|
27
34
|
|
|
28
35
|
## 2026-04-02 not anymore.
|
|
29
36
|
# before_validation :check_value
|
|
@@ -102,6 +102,16 @@ class WcoEmail::Message
|
|
|
102
102
|
config: config,
|
|
103
103
|
})
|
|
104
104
|
|
|
105
|
+
when WcoEmail::EmailFilterAction::KIND_AUTORESPOND
|
|
106
|
+
ctx = WcoEmail::Context.new({
|
|
107
|
+
email_template: action.email_template,
|
|
108
|
+
lead_id: message.lead_id,
|
|
109
|
+
send_at: Time.now,
|
|
110
|
+
})
|
|
111
|
+
if action.email_template.respond_inline
|
|
112
|
+
ctx.reply_to_message_id = self.id
|
|
113
|
+
end
|
|
114
|
+
ctx.save!
|
|
105
115
|
|
|
106
116
|
end
|
|
107
117
|
end
|