ishapi 0.1.8.216 → 0.1.8.218
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d34073871c3d975fddb03705694ead82dbc7878f7451f2dff162e1f2b3a9bd80
|
4
|
+
data.tar.gz: b3d45298dd10f4ce2a5a69acfeb966048a58e37a7dd24c8456d3033dbe6bbe6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25409ffc536c75af09a39921f3658751fce427e7a5427873f2489b084a8873485bfb5ffac7c67bc219d914b07013aa3b8be955d3c6e53292f9022c1a1fd00372
|
7
|
+
data.tar.gz: 7f9014268bedac0980a9930c9bf16be3289097d21dc1ce8286295ca988f1181ddfc40345da8e78b46ad3755ae6e3ad49b508cd7930dab08ef358b8dc4a443e11
|
@@ -4,13 +4,30 @@ require_dependency "ishapi/application_controller"
|
|
4
4
|
class ::Ishapi::EmailMessagesController < ::Ishapi::ApplicationController
|
5
5
|
|
6
6
|
before_action :check_jwt, only: [ :show ]
|
7
|
+
layout false
|
7
8
|
|
8
9
|
def show
|
9
|
-
msg = Office::EmailMessage.find( params[:id] )
|
10
|
-
authorize! :show, msg
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
@msg = Office::EmailMessage.find( params[:id] )
|
11
|
+
authorize! :show, @msg
|
12
|
+
|
13
|
+
if params[:load_images]
|
14
|
+
;
|
15
|
+
else
|
16
|
+
doc = Nokogiri::HTML(@msg.part_html)
|
17
|
+
images = doc.search('img')
|
18
|
+
images.each do |img|
|
19
|
+
img['src'] = 'missing'
|
20
|
+
end
|
21
|
+
@msg.part_html = doc
|
22
|
+
end
|
23
|
+
|
24
|
+
respond_to do |format|
|
25
|
+
format.json do
|
26
|
+
render json: { item: @msg, }
|
27
|
+
end
|
28
|
+
format.html do
|
29
|
+
end
|
30
|
+
end
|
14
31
|
end
|
15
32
|
|
16
33
|
## From lambda, ses
|
@@ -21,7 +38,7 @@ class ::Ishapi::EmailMessagesController < ::Ishapi::ApplicationController
|
|
21
38
|
end
|
22
39
|
|
23
40
|
msg = Office::EmailMessageStub.new({
|
24
|
-
object_path: params[:object_path],
|
41
|
+
# object_path: params[:object_path],
|
25
42
|
object_key: params[:object_key],
|
26
43
|
})
|
27
44
|
if msg.save
|
@@ -7,8 +7,10 @@ stub = Stub.find_by( object_key: m_id_2 )
|
|
7
7
|
stub.update_attribute(:state, 'state_pending')
|
8
8
|
Ishapi::EmailMessageIntakeJob.perform_now( stub.id.to_s )
|
9
9
|
|
10
|
-
|
11
10
|
=end
|
11
|
+
|
12
|
+
|
13
|
+
|
12
14
|
##
|
13
15
|
## 2023-02-26 _vp_ let's go
|
14
16
|
## 2023-03-02 _vp_ Continue
|
@@ -49,7 +51,7 @@ class Ishapi::EmailMessageIntakeJob < Ishapi::ApplicationJob
|
|
49
51
|
|
50
52
|
def perform id
|
51
53
|
stub = ::Office::EmailMessageStub.find id
|
52
|
-
puts "Performing EmailMessageIntakeJob for
|
54
|
+
puts "Performing EmailMessageIntakeJob for object_key #{stub.object_key}"
|
53
55
|
if stub.state != ::Office::EmailMessageStub::STATE_PENDING
|
54
56
|
raise "This stub has already been processed: #{stub.id.to_s}."
|
55
57
|
return
|
@@ -61,7 +63,7 @@ class Ishapi::EmailMessageIntakeJob < Ishapi::ApplicationJob
|
|
61
63
|
|
62
64
|
_mail = client.get_object( bucket: ::S3_CREDENTIALS[:bucket_ses], key: stub.object_key ).body.read
|
63
65
|
the_mail = Mail.new(_mail)
|
64
|
-
message_id = the_mail.header['message-id'].decoded
|
66
|
+
message_id = the_mail.header['message-id'].decoded
|
65
67
|
in_reply_to_id = the_mail.header['in-reply-to']&.to_s
|
66
68
|
|
67
69
|
@message = ::Office::EmailMessage.where( message_id: message_id ).first
|
@@ -73,7 +75,7 @@ class Ishapi::EmailMessageIntakeJob < Ishapi::ApplicationJob
|
|
73
75
|
in_reply_to_id: in_reply_to_id,
|
74
76
|
|
75
77
|
object_key: stub.object_key,
|
76
|
-
object_path: stub.object_path,
|
78
|
+
# object_path: stub.object_path,
|
77
79
|
|
78
80
|
subject: the_mail.subject,
|
79
81
|
date: the_mail.date,
|
data/config/routes.rb
CHANGED
@@ -4,14 +4,23 @@ Ishapi::Engine.routes.draw do
|
|
4
4
|
root :to => 'application#home'
|
5
5
|
post 'home', :to => 'application#home'
|
6
6
|
|
7
|
-
|
7
|
+
# A
|
8
8
|
resources :addresses
|
9
9
|
|
10
|
+
# E
|
11
|
+
post 'email_messages', to: 'email_messages#receive'
|
12
|
+
get 'email_messages/:id', to: 'email_messages#show', as: :email_message
|
13
|
+
|
14
|
+
delete 'email_conversations', to: 'email_conversations#delete'
|
15
|
+
|
16
|
+
# G
|
10
17
|
get 'galleries', :to => 'galleries#index'
|
11
18
|
post 'galleries', :to => 'galleries#index'
|
12
19
|
get 'galleries/view/:slug', :to => 'galleries#show'
|
13
20
|
post 'galleries/view/:slug', :to => 'galleries#show'
|
14
21
|
|
22
|
+
# H
|
23
|
+
# I
|
15
24
|
post 'invoices/search', :to => 'invoices#search'
|
16
25
|
|
17
26
|
# L
|
@@ -32,11 +41,6 @@ Ishapi::Engine.routes.draw do
|
|
32
41
|
# N
|
33
42
|
delete 'newsitems/:id', to: 'newsitems#destroy'
|
34
43
|
|
35
|
-
post 'email_messages', to: 'email_messages#receive'
|
36
|
-
get 'email_messages/:id', to: 'email_messages#show'
|
37
|
-
|
38
|
-
delete 'email_conversations', to: 'email_conversations#delete'
|
39
|
-
|
40
44
|
post 'do_purchase', to: 'gameui#do_purchase' # @TODO: rename to just purchase, or destroy endpoint
|
41
45
|
post 'payments', :to => 'payments#create'
|
42
46
|
post 'payments2', :to => 'payments#create2' # @TODO: change
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ishapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.8.
|
4
|
+
version: 0.1.8.218
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -241,6 +241,7 @@ files:
|
|
241
241
|
- app/views/ishapi/application/_meta.jbuilder
|
242
242
|
- app/views/ishapi/application/_pagination.jbuilder
|
243
243
|
- app/views/ishapi/application_mailer/forwarder_notify.html.erb
|
244
|
+
- app/views/ishapi/email_messages/show.haml
|
244
245
|
- app/views/ishapi/galleries/_index.jbuilder
|
245
246
|
- app/views/ishapi/galleries/_show.jbuilder
|
246
247
|
- app/views/ishapi/galleries/index.jbuilder
|