Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
parterburn committed Jan 8, 2024
1 parent 4406087 commit 253ad5a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/lib/email_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,13 @@ def clean_html_version(html)
end

def collage_from_mailgun_attachments
if @user.id == 1
p "*" * 100
p "MESSAGE ID"
p @message_id
p "*" * 100
end

return unless @message_id.present?

connection = Faraday.new("https://api.mailgun.net") do |f|
Expand All @@ -370,6 +377,13 @@ def collage_from_mailgun_attachments
f.request :authorization, :basic, 'api', ENV['MAILGUN_API_KEY']
end
message = msg_conn.get(message_url.path)

if @user.id == 1
p "*" * 100
p "MESSAGE BODY"
p message.body
p "*" * 100
end
return unless message.body["recipients"].to_s.include?(@user.user_key) || message.body["from"].to_s.include?(@user.email)

attachment_urls = message.body["attachments"].map do |att|
Expand Down

0 comments on commit 253ad5a

Please sign in to comment.