wco_models 3.1.0.256 → 3.1.0.257

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df997a022614f9d91328ec9895d6751031d95757c3bd440a8d901e3b9ec05039
4
- data.tar.gz: 0d5b4f8ae88b862dd789bd222d07f8a1d22830b2fc002fe443e9df3fe888fced
3
+ metadata.gz: 6e767956c5c69ff3ca2f88a2d28dc018dfd4fb0db6007d75b28cfbf73eb49620
4
+ data.tar.gz: 46eb26b616382e9d327660cee34914087f09d21c09e2f348c4ec05bebb3323e4
5
5
  SHA512:
6
- metadata.gz: eeb94f1ebc9fe0c9e8f889e91131fca6d3f497f641e2ab08edb2e762aeedc2716079a0e71ff33f5b3a00070161e8b13e015dc5a52a90fa3174dcf5c157271339
7
- data.tar.gz: 6da49cff643a536dc13c169de9b37d0d82cf0ecfaf5cd1ef2bc3c1dc9cdca6c6a566e4d9b7de646698a94cc40124d73ef0a06c42f28c2a2f56e3d599493a806b
6
+ metadata.gz: 46c2f66b85a3f83afc8df98daa734ba49bc38e3b9ca96b83919d2b777f1524cad61595b4862a1795a4aa59805c3b6a5e7703483f5c31d7452a32ca2620d77280
7
+ data.tar.gz: 7aaee28f649f23c530fe400e60e7233a46d8c0981e0bc0d4c7afebbcac5f56c9b0c2466f287ca4a2f8c542ebe527a6645f154624a614f99c7fd1926902b3c94a
@@ -40,20 +40,27 @@ class WcoEmail::EmailFilterCondition
40
40
  cond = self
41
41
  reason = nil
42
42
  case cond.field
43
- when WcoEmail::FIELD_LEADSET
44
- if cond.operator == WcoEmail::OPERATOR_NOT_HAS_TAG
45
- this_tag = Wco::Tag.find cond.value
46
- if leadset.tags.include?( this_tag )
47
- ;
48
- else
49
- reason = "#{email_skip_filter ? 'skip_' : ''}condition leadset not-has-tag #{this_tag} NOT met"
43
+ ## from match-i <value>
44
+ when WcoEmail::EmailFilterCondition::FIELD_FROM
45
+ if cond.operator == WcoEmail::EmailFilterCondition::OPERATOR_MATCH
46
+ if message.from.downcase.include?( value.downcase )
47
+ reason = "#{email_skip_filter ? 'skip_' : ''}condition from match-i `#{value}`"
50
48
  end
51
49
  end
52
- when WcoEmail::FIELD_TO
53
- if message.to == cond.value
54
- reason = "{email_skip_filter ? 'skip_' : ''}condition to = #{cond.value}"
55
- end
56
- end
50
+ # when WcoEmail::FIELD_LEADSET
51
+ # if cond.operator == WcoEmail::OPERATOR_NOT_HAS_TAG
52
+ # this_tag = Wco::Tag.find cond.value
53
+ # if leadset.tags.include?( this_tag )
54
+ # ;
55
+ # else
56
+ # reason = "#{email_skip_filter ? 'skip_' : ''}condition leadset not-has-tag #{this_tag} NOT met"
57
+ # end
58
+ # end
59
+ # when WcoEmail::FIELD_TO
60
+ # if message.to == cond.value
61
+ # reason = "{email_skip_filter ? 'skip_' : ''}condition to = #{cond.value}"
62
+ # end
63
+ # end
57
64
  return reason
58
65
  end
59
66
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.256
4
+ version: 3.1.0.257
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev