ish_models 0.0.33.248 → 0.0.33.250
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/office/email_filter.rb +8 -6
- data/lib/office/email_message.rb +0 -5
- data/lib/office/scheduled_email_action.rb +2 -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: 22ede27935043d3acbca5e217b8accd8e8749bb873fa0c2fec31d66959c5e8f1
|
4
|
+
data.tar.gz: 87c6f2a10a48a2b960a1dee94f1e4363609a76befa030d7bbc3d306de3c49f41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 392b97f6f8e9df5b1d309ea43035369927ddde49e41a2770045f95c49c21718db1eb2c07ffaa85df67d511ecadc736aa18bd1bf4659abf3a87de5d9d6bba484f
|
7
|
+
data.tar.gz: ff3b10c7292ba050c3365fcf302c24ac0a89c93f1842edcf2289d75e14860aaf14bd73b86a0c642f683e8ac0411ef1dace1b46c5765abe47495d75958b95fbc7
|
data/lib/office/email_filter.rb
CHANGED
@@ -13,15 +13,17 @@ class Office::EmailFilter
|
|
13
13
|
field :body_regex
|
14
14
|
field :body_exact
|
15
15
|
|
16
|
-
|
16
|
+
|
17
17
|
KIND_AUTORESPOND_TMPL = 'autorespond-template'
|
18
18
|
KIND_AUTORESPOND_EACT = 'autorespond-email-action'
|
19
|
-
KIND_REMOVE_TAG
|
20
|
-
KIND_ADD_TAG
|
21
|
-
|
22
|
-
|
19
|
+
KIND_REMOVE_TAG = 'remove-tag'
|
20
|
+
KIND_ADD_TAG = 'add-tag'
|
21
|
+
|
22
|
+
KIND_AUTORESPOND = 'autorespond' # @deprecated, DO NOT USE!
|
23
|
+
KIND_DELETE = 'delete' # @deprecated, use add-tag
|
24
|
+
KIND_SKIP_INBOX = 'skip-inbox' # @deprecated, use remove-tag
|
23
25
|
|
24
|
-
KINDS = [ nil, KIND_AUTORESPOND_TMPL, KIND_AUTORESPOND_EACT,
|
26
|
+
KINDS = [ nil, KIND_AUTORESPOND_TMPL, KIND_AUTORESPOND_EACT, KIND_ADD_TAG, KIND_REMOVE_TAG]
|
25
27
|
field :kind
|
26
28
|
|
27
29
|
STATE_ACTIVE = 'active'
|
data/lib/office/email_message.rb
CHANGED
@@ -94,11 +94,6 @@ class Office::EmailMessage
|
|
94
94
|
def apply_filter filter
|
95
95
|
case filter.kind
|
96
96
|
|
97
|
-
## @deprecated, use KIND_REMOVE_TAG
|
98
|
-
when ::Office::EmailFilter::KIND_SKIP_INBOX
|
99
|
-
# self.remove_tag( WpTag::INBOX )
|
100
|
-
self.conv.remove_tag( WpTag::INBOX )
|
101
|
-
|
102
97
|
when ::Office::EmailFilter::KIND_ADD_TAG
|
103
98
|
self.conv.add_tag( filter.wp_term_id )
|
104
99
|
|
@@ -15,7 +15,8 @@ class Office::ScheduledEmailAction
|
|
15
15
|
|
16
16
|
STATE_ACTIVE = 'active'
|
17
17
|
STATE_INACTIVE = 'inactive'
|
18
|
-
|
18
|
+
STATE_TRASH = 'trash'
|
19
|
+
STATES = [ STATE_ACTIVE, STATE_INACTIVE, STATE_TRASH ]
|
19
20
|
field :state, type: :string
|
20
21
|
scope :active, ->{ where( state: STATE_ACTIVE ) }
|
21
22
|
|