wco_models 3.1.0.299 → 3.1.0.300

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: 85d0f9cb5751a72aeb7b9e1c5f5e9b2c214651c32d6f72c7bf8810779ba88fc7
4
- data.tar.gz: db30f4c53771bd033fa413d9031e2d852b1d390d77b7742107adb049f551a1d4
3
+ metadata.gz: 92cff78067ebf0b1d3864b4d34279bc2ff8301aa8b5644a06928769519a631b1
4
+ data.tar.gz: c8f2866c7c375f56c351275689f17ddbe70fdb9c7efa9e1d714c1579bceea197
5
5
  SHA512:
6
- metadata.gz: 07d605a7ec77f355862a3ec60e2f44fbc8b715de3e6d89a7f57109a1abc1cf289c79a3c4424d61316600c89e4ee95a6510c4ad923f2613cd45e73a28a4c79066
7
- data.tar.gz: a8a390ed961f591d1e9cb481653252c63989b0c6820eec53da41ece91b28104a689af3091ca0dc50795b89d4263db624413077114acb7a5e37385fcdb258a855
6
+ metadata.gz: 65fb700ea7bc8e05d0aa59805bd14469a248e0703a129eaaa0dba666c2943be994fbe7f9c207f79463c339e7d24725aaa62060ce1bae606f0a90ba25c8467704
7
+ data.tar.gz: b0fc24ace08414f45df24ad60b58afc91e1a03581231f87020c9d98a00ece1a236a2895d4e1baeda3c9b9f278f1d4b0acc318705a737efe4c32840a9de61c88e
@@ -59,15 +59,16 @@ class WcoEmail::Message
59
59
 
60
60
  field :part_txt
61
61
 
62
- field :from, type: :string
63
- field :froms, type: Array, default: []
62
+ field :from, type: :string
63
+ field :mail_from, type: :string
64
+ field :spam_status, type: :string
64
65
  belongs_to :lead, class_name: 'Wco::Lead', inverse_of: :email_messages
65
66
 
66
67
  field :to, type: :string
67
68
  field :tos, type: Array, default: []
68
69
  field :cc, type: :string
69
70
  field :ccs, type: Array, default: []
70
- def all_ccs; (tos||[]) + (ccs||[]) + (froms||[]); end
71
+ def all_ccs; (tos||[]) + (ccs||[]) + [from] + [mail_from]; end ## this is uncertain... _vp_ 2026-07-20
71
72
  field :bcc, type: :string
72
73
  field :bccs, type: Array, default: []
73
74
 
@@ -75,6 +75,7 @@ class WcoEmail::MessageStub
75
75
  ## Leadset, Lead
76
76
  # from = json['mail_from'] || "nobody@unknown-doma.in"
77
77
  from = json['from'][/<([^>]+)>/, 1].downcase rescue json['mail_from']
78
+ mail_from = json['mail_from']
78
79
  @lead = Wco::Lead.find_or_create_by_email( from )
79
80
  @conv.leads.push @lead
80
81
  @leadset = Wco::Leadset.from_email from
@@ -95,7 +96,8 @@ class WcoEmail::MessageStub
95
96
  subject: subject,
96
97
  date: json['date'].to_s,
97
98
 
98
- from: from,
99
+ from: from,
100
+ mail_from: mail_from,
99
101
  to: json['to'],
100
102
  cc: json['cc'],
101
103
 
@@ -156,6 +158,11 @@ class WcoEmail::MessageStub
156
158
  end
157
159
  end
158
160
 
161
+ if 'Spam' == json['spam_status']
162
+ @conv.tags.push Wco::Tag.spam
163
+ conv.tags -= [ Wco::Tag.inbox ]
164
+ end
165
+
159
166
  stub.update_attributes({ status: WcoEmail::MessageStub::STATUS_PROCESSED })
160
167
 
161
168
  ## Notification
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.299
4
+ version: 3.1.0.300
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev