mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
FIX: FIX: Correctly parse Mandrill webhooks (#17116)
Mandrill sends webhook messages as a URL-encoded body, with the mandrill_events property as an encoded JSON array.
This commit is contained in:
@ -49,7 +49,7 @@ class WebhooksController < ActionController::Base
|
||||
end
|
||||
|
||||
def mandrill
|
||||
events = params["mandrill_events"]
|
||||
events = JSON.parse(params["mandrill_events"])
|
||||
events.each do |event|
|
||||
message_id = event.dig("msg", "metadata", "message_id")
|
||||
to_address = event.dig("msg", "email")
|
||||
|
Reference in New Issue
Block a user