ishapi 0.1.8.216 → 0.1.8.217
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5327c6d97d7c4bbac4285833c8d46f43fe58bb1e011fa730040d252acf4ef2a
|
4
|
+
data.tar.gz: dfc315e44f063a8cb1de1b6bede93171477f57c293cae167999573ab70e77e09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7910b9bff69f6be9bc29242a348bd6f7f2ab6a58b92c49fa307d33c72aba48ec220fc57bdad5a7fdd10db35676dfd74e708cf1f0d0197ae0323a98bb6f9da0a
|
7
|
+
data.tar.gz: e3dced336ce3cfb026bbc8ed14facf33a1a899a20655fa8d8fe31ae5a663e0fef771a958ba20af02c6013533d4352d0df737baeccf400306f3a2dbc7165d0c07
|
@@ -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.217
|
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
|