wco_models 3.1.0.49 → 3.1.0.50
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/lead.rb +2 -0
- data/app/models/wco_email/context.rb +3 -1
- data/app/models/wco_email/email_template.rb +4 -4
- data/app/models/wco_email/message.rb +3 -0
- data/lib/wco_models.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a17b1b5e607a9bd18dd6f5b6f6b4346e8af8b25460bc07a622fd7c54d1cf928
|
4
|
+
data.tar.gz: c5974d04bbac542b413cf6d444694e5e319271c27a4a399accd8c811a2609166
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8645a7db623d91cafd9f3a828e2e9ceabea87dcbefecdadfe21cddd74f51cbad6622535466179e9d004b9201d5f89a11157ceeb629bc551def8ea450045fbe2
|
7
|
+
data.tar.gz: 538e2e1e434bd37a7995f8b51b573f424aa76eb483cc196eb34d3c0dc89f18346f238ebbea244c586db976c8cfdf33be1ae6946a6b69aa6fa3f3b7c45bf7eacb
|
data/app/models/wco/lead.rb
CHANGED
@@ -16,6 +16,8 @@ class Wco::Lead
|
|
16
16
|
belongs_to :leadset, class_name: 'Wco::Leadset'
|
17
17
|
has_one :photo, class_name: 'Wco::Photo'
|
18
18
|
|
19
|
+
has_many :email_messages, class_name: '::WcoEmail::Message', inverse_of: :lead
|
20
|
+
|
19
21
|
has_and_belongs_to_many :conversations, class_name: '::WcoEmail::Conversation'
|
20
22
|
def convs; conversations; end
|
21
23
|
has_many :email_contexts, class_name: '::WcoEmail::Context'
|
@@ -1,7 +1,7 @@
|
|
1
|
+
|
1
2
|
##
|
2
3
|
## Send a single email
|
3
4
|
##
|
4
|
-
|
5
5
|
class WcoEmail::Context
|
6
6
|
include Mongoid::Document
|
7
7
|
include Mongoid::Timestamps
|
@@ -45,6 +45,8 @@ class WcoEmail::Context
|
|
45
45
|
self[:subject].presence || tmpl.subject
|
46
46
|
end
|
47
47
|
|
48
|
+
belongs_to :reply_to_message, class_name: 'WcoEmail::Message', inverse_of: :replies, optional: true
|
49
|
+
|
48
50
|
belongs_to :email_template, class_name: 'WcoEmail::EmailTemplate'
|
49
51
|
def tmpl; email_template; end
|
50
52
|
|
@@ -106,10 +106,10 @@ class WcoEmail::EmailTemplate
|
|
106
106
|
binding()
|
107
107
|
end
|
108
108
|
|
109
|
-
has_many :email_actions, class_name: 'WcoEmail::EmailAction'
|
110
|
-
has_many :email_contexts, class_name: 'WcoEmail::
|
111
|
-
has_many :email_filters, class_name: 'WcoEmail::EmailFilter'
|
112
|
-
has_many :unsubscribes, class_name: 'WcoEmail::Unsubscribe'
|
109
|
+
has_many :email_actions, class_name: '::WcoEmail::EmailAction'
|
110
|
+
has_many :email_contexts, class_name: '::WcoEmail::Context'
|
111
|
+
has_many :email_filters, class_name: '::WcoEmail::EmailFilter'
|
112
|
+
has_many :unsubscribes, class_name: '::WcoEmail::Unsubscribe'
|
113
113
|
|
114
114
|
SLUG_BLANK = 'blank'
|
115
115
|
def self.blank_template
|
@@ -49,6 +49,8 @@ class WcoEmail::Message
|
|
49
49
|
|
50
50
|
field :from, type: :string
|
51
51
|
field :froms, type: Array, default: []
|
52
|
+
belongs_to :lead, class_name: 'Wco::Lead', inverse_of: :email_messages
|
53
|
+
|
52
54
|
field :to, type: :string
|
53
55
|
field :tos, type: Array, default: []
|
54
56
|
field :cc, type: :string
|
@@ -69,6 +71,7 @@ class WcoEmail::Message
|
|
69
71
|
|
70
72
|
has_many :assets, class_name: '::Wco::Asset'
|
71
73
|
has_many :photos, class_name: '::Wco::Photo'
|
74
|
+
has_many :replies, class_name: '::WcoEmail::Context', inverse_of: :reply_to_message
|
72
75
|
|
73
76
|
def apply_filter filter
|
74
77
|
case filter.kind
|
data/lib/wco_models.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wco_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.0.
|
4
|
+
version: 3.1.0.50
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Pudeyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-01-
|
11
|
+
date: 2024-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|