mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 17:06:31 -06:00
FIX: SES webhook wasn't parsing the message
This commit is contained in:
parent
6d7c0c8f13
commit
31e06dbcd2
@ -4,7 +4,7 @@ module Jobs
|
||||
sidekiq_options retry: false
|
||||
|
||||
def execute(args)
|
||||
return unless raw = args[:raw].presence
|
||||
return unless raw = args[:raw].presence
|
||||
return unless json = args[:json].presence
|
||||
return unless subscribe_url = json["SubscribeURL"].presence
|
||||
|
||||
|
@ -4,11 +4,17 @@ module Jobs
|
||||
sidekiq_options retry: false
|
||||
|
||||
def execute(args)
|
||||
return unless raw = args[:raw].presence
|
||||
return unless raw = args[:raw].presence
|
||||
return unless json = args[:json].presence
|
||||
|
||||
return unless message = json["Message"].presence
|
||||
return unless message["notificationType"] == "Bounce"
|
||||
|
||||
message = begin
|
||||
JSON.parse(message)
|
||||
rescue JSON::ParserError
|
||||
nil
|
||||
end
|
||||
|
||||
return unless message && message["notificationType"] == "Bounce"
|
||||
return unless message_id = message.dig("mail", "messageId").presence
|
||||
return unless bounce_type = message.dig("bounce", "bounceType").presence
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user