wco_email 0.1.1.104 → 0.1.1.105
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/controllers/wco_email/api/messages_controller.rb +2 -2
- data/app/controllers/wco_email/email_actions_controller.rb +3 -0
- data/app/controllers/wco_email/message_stubs_controller.rb +13 -1
- data/app/jobs/wco_email/message_intake_job.rb +9 -9
- data/app/views/wco_email/_sidebar.haml +3 -2
- data/app/views/wco_email/conversations/_tags_actions.haml +1 -1
- data/app/views/wco_email/conversations/show.haml +2 -2
- data/app/views/wco_email/email_action_templates/_form.haml +14 -14
- data/app/views/wco_email/email_actions/_header.haml +5 -3
- data/app/views/wco_email/email_actions/index.haml +1 -1
- data/app/views/wco_email/email_filters/edit.haml +0 -1
- data/app/views/wco_email/message_stubs/_form.haml +3 -0
- data/config/routes.rb +1 -0
- data/lib/tasks/wco_email_tasks.rake +1 -1
- 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: 121ee8eb2dac74bf04002d35683799f45c7ae08480705b17c5df421b92f15d80
|
|
4
|
+
data.tar.gz: edb2f14b24faa32c1ffdb26f7f5c81e381a2b0fa5081ed1a4f373969df3cc09b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ee5331b8f4ce1499f7b5a424f6f7c66dd12219ccb7629800d0c7bb426c66b6b35311bbf74fb3cebf7b7194f30f7f9facf763a6a38a9beaec7ea3bc9b9337723b
|
|
7
|
+
data.tar.gz: '084af70293371b5dd7a04c6ae13ebc6619893e6603d7223f35970483d64643675fd40053b286fa9977545114133e5738ed566733882d09e0aa6da78eb1fad71f'
|
|
@@ -7,12 +7,12 @@ class WcoEmail::Api::MessagesController < WcoEmail::ApiController
|
|
|
7
7
|
|
|
8
8
|
## 2026-03-27 payload is parsed json.
|
|
9
9
|
def create_postal
|
|
10
|
-
puts! params, 'api/messages#create_postal'
|
|
10
|
+
# puts! params, 'api/messages#create_postal'
|
|
11
11
|
|
|
12
12
|
## save to bucket
|
|
13
13
|
@client ||= Aws::S3::Client.new(::SES_S3_CREDENTIALS)
|
|
14
14
|
@client.put_object({
|
|
15
|
-
body: params
|
|
15
|
+
body: JSON.pretty_generate( params ),
|
|
16
16
|
bucket: ::SES_S3_BUCKET,
|
|
17
17
|
content_type: 'application/json',
|
|
18
18
|
key: params['message_id'],
|
|
@@ -35,6 +35,9 @@ class WcoEmail::EmailActionsController < WcoEmail::ApplicationController
|
|
|
35
35
|
:email_action_template_id.in => email_action_template_ids,
|
|
36
36
|
})
|
|
37
37
|
end
|
|
38
|
+
if params[:status]
|
|
39
|
+
@email_actions = @email_actions.where( status: params[:status] )
|
|
40
|
+
end
|
|
38
41
|
end
|
|
39
42
|
|
|
40
43
|
def new
|
|
@@ -5,9 +5,20 @@ class WcoEmail::MessageStubsController < WcoEmail::ApplicationController
|
|
|
5
5
|
@stub = WcoEmail::MessageStub.find params[:id]
|
|
6
6
|
authorize! :churn, @stub
|
|
7
7
|
|
|
8
|
+
if 'json' == @stub.format
|
|
9
|
+
@stub.do_process_json ## postal server
|
|
10
|
+
else
|
|
11
|
+
@stub.do_process
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
=begin
|
|
8
15
|
# WcoEmail::MessageIntakeJob.perform_async( @stub.id.to_s )
|
|
9
16
|
begin
|
|
10
|
-
@stub.
|
|
17
|
+
if 'json' == @stub.format
|
|
18
|
+
@stub.do_process_json ## postal server
|
|
19
|
+
else
|
|
20
|
+
@stub.do_process
|
|
21
|
+
end
|
|
11
22
|
rescue => err
|
|
12
23
|
@stub.update({ status: WcoEmail::MessageStub::STATUS_FAILED })
|
|
13
24
|
puts! err, "WcoEmail::MessageIntakeJob error"
|
|
@@ -16,6 +27,7 @@ class WcoEmail::MessageStubsController < WcoEmail::ApplicationController
|
|
|
16
27
|
data: { stub: @stub }
|
|
17
28
|
)
|
|
18
29
|
end
|
|
30
|
+
=end
|
|
19
31
|
|
|
20
32
|
flash_notice "Churned 1 stub."
|
|
21
33
|
redirect_to request.referrer
|
|
@@ -29,26 +29,26 @@ class WcoEmail::MessageIntakeJob
|
|
|
29
29
|
|
|
30
30
|
=end
|
|
31
31
|
def perform id
|
|
32
|
-
stub = WcoEmail::MessageStub.find id
|
|
33
|
-
puts "+++ +++ Performing WcoEmail::MessageIntakeJob for object_key `#{stub.object_key}`."
|
|
32
|
+
@stub = WcoEmail::MessageStub.find id
|
|
33
|
+
puts "+++ +++ Performing WcoEmail::MessageIntakeJob for object_key `#{@stub.object_key}`."
|
|
34
34
|
|
|
35
|
-
if [ WcoEmail::MessageStub::STATUS_PROCESSED, WcoEmail::MessageStub::STATUS_FAILED ].include?( stub.status )
|
|
36
|
-
raise "This stub has already been processed, or errored out: #{stub.id.to_s}."
|
|
35
|
+
if [ WcoEmail::MessageStub::STATUS_PROCESSED, WcoEmail::MessageStub::STATUS_FAILED ].include?( @stub.status )
|
|
36
|
+
raise "This stub has already been processed, or errored out: #{@stub.id.to_s}."
|
|
37
37
|
return
|
|
38
38
|
end
|
|
39
39
|
|
|
40
40
|
begin
|
|
41
|
-
if 'json' == stub.format
|
|
42
|
-
stub.do_process_json ## postal server
|
|
41
|
+
if 'json' == @stub.format
|
|
42
|
+
@stub.do_process_json ## postal server
|
|
43
43
|
else
|
|
44
|
-
stub.do_process
|
|
44
|
+
@stub.do_process
|
|
45
45
|
end
|
|
46
46
|
rescue => err
|
|
47
|
-
stub.update({ status: WcoEmail::MessageStub::STATUS_FAILED })
|
|
47
|
+
@stub.update({ status: WcoEmail::MessageStub::STATUS_FAILED })
|
|
48
48
|
puts! err, "WcoEmail::MessageIntakeJob error"
|
|
49
49
|
::ExceptionNotifier.notify_exception(
|
|
50
50
|
err,
|
|
51
|
-
data: { stub: stub }
|
|
51
|
+
data: { stub: @stub }
|
|
52
52
|
)
|
|
53
53
|
end
|
|
54
54
|
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
- @tags.each do |tag|
|
|
5
5
|
%li
|
|
6
6
|
= link_to tag.slug, conversations_in_path( tag.slug )
|
|
7
|
-
<b>#{tag.conversations.unread.length}</b>
|
|
8
|
-
(#{tag.conversations.length})
|
|
7
|
+
-# <b>#{tag.conversations.unread.length}</b>
|
|
8
|
+
-# (#{tag.conversations.length})
|
|
9
|
+
\|
|
|
9
10
|
= link_to "not", conversations_not_in_path( tag.slug )
|
|
10
11
|
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
= render '/wco/tags/index_chips', tags: @conversation.tags, config: { skip_checkbox: true }
|
|
14
14
|
|
|
15
15
|
= render '/wco_email/conversations/tags_actions'
|
|
16
|
-
= render '/wco/leads/
|
|
17
|
-
= render '/wco/leadsets/
|
|
16
|
+
= render '/wco/leads/index', leads: @conversation.leads
|
|
17
|
+
= render '/wco/leadsets/index', leadsets: @conversation.leadsets
|
|
18
18
|
|
|
19
19
|
- if @other_convs.present?
|
|
20
20
|
%h5 Other convs:
|
|
@@ -17,23 +17,23 @@
|
|
|
17
17
|
%label Template
|
|
18
18
|
= f.select :email_template_id, options_for_select( @email_templates_list, selected: tmpl.email_template_id ), {}, class: 'select2'
|
|
19
19
|
|
|
20
|
+
|
|
20
21
|
.col-md-6
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
%label Next Email Actions
|
|
23
|
+
.eg rand(1..5).business_days.from_now.to_date + rand(8..16).hours + rand(1..59).minutes
|
|
24
|
+
.eg This is not an interval! But you can do Time.now + 30.seconds
|
|
25
|
+
%br
|
|
26
|
+
|
|
27
|
+
= f.fields_for :ties do |next_f|
|
|
28
|
+
.flex-row.field
|
|
29
|
+
%label next_at_exe
|
|
30
|
+
= next_f.text_field :next_at_exe, class: 'flex-grow-1 w-100'
|
|
31
|
+
.flex-row.field
|
|
32
|
+
= next_f.label :to_delete
|
|
33
|
+
= next_f.check_box :to_delete
|
|
34
|
+
= next_f.select :next_tmpl_id, options_for_select( @email_action_templates_list, selected: next_f.object.next_tmpl_id ), { }, { class: 'select2' }
|
|
25
35
|
%br
|
|
26
36
|
|
|
27
|
-
= f.fields_for :ties do |next_f|
|
|
28
|
-
.flex-row.field
|
|
29
|
-
%label next_at_exe
|
|
30
|
-
= next_f.text_field :next_at_exe, class: 'flex-grow-1 w-100'
|
|
31
|
-
.flex-row.field
|
|
32
|
-
= next_f.label :to_delete
|
|
33
|
-
= next_f.check_box :to_delete
|
|
34
|
-
= next_f.select :next_tmpl_id, options_for_select( @email_action_templates_list, selected: next_f.object.next_tmpl_id ), { }, { class: 'select2' }
|
|
35
|
-
%br
|
|
36
|
-
|
|
37
37
|
.row
|
|
38
38
|
.col-sm-6
|
|
39
39
|
= f.submit :submit
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
= link_to "Email Actions (#{WcoEmail::EmailAction.all.length})", email_actions_path
|
|
4
|
+
= link_to "Email Actions (#{WcoEmail::EmailAction.all.length})", wco_email.email_actions_path
|
|
5
|
+
= link_to '[A]', wco_email.email_actions_path( status: 'active' )
|
|
6
|
+
|
|
5
7
|
.inline-search
|
|
6
|
-
= form_tag email_actions_path, method: :get do
|
|
8
|
+
= form_tag wco_email.email_actions_path, method: :get do
|
|
7
9
|
= text_field_tag :q
|
|
8
|
-
= link_to '[+]', new_email_action_path
|
|
10
|
+
= link_to '[+]', wco_email.new_email_action_path
|
data/config/routes.rb
CHANGED
|
@@ -47,6 +47,7 @@ WcoEmail::Engine.routes.draw do
|
|
|
47
47
|
get 'email_templates/:id/iframe', to: 'email_templates#show_iframe', as: :email_template_iframe
|
|
48
48
|
resources :email_templates
|
|
49
49
|
|
|
50
|
+
## hopefully there will be no such thing - use office_actions
|
|
50
51
|
resources :lead_action_templates
|
|
51
52
|
resources :lead_actions
|
|
52
53
|
|
|
@@ -170,7 +170,7 @@ namespace :wco_email do
|
|
|
170
170
|
|
|
171
171
|
desc 'send contexts'
|
|
172
172
|
task send_contexts: :environment do
|
|
173
|
-
puts! "Starting wco_email:send_contexts..."
|
|
173
|
+
puts! "Starting wco_email:send_contexts... #{Rails.env}"
|
|
174
174
|
while true do
|
|
175
175
|
|
|
176
176
|
ctxs = WcoEmail::Context.scheduled.notsent
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wco_email
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.1.
|
|
4
|
+
version: 0.1.1.105
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Victor Pudeyev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-04-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk-s3
|