We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e3b21e commit 40b758bCopy full SHA for 40b758b
lib/honeybadger/notification_subscriber.rb
@@ -133,6 +133,19 @@ def format_payload(payload)
133
end
134
135
class ActionMailerSubscriber < NotificationSubscriber
136
+ def format_payload(payload)
137
+ # Don't include the mail object in the payload...
138
+ mail = payload.delete(:mail)
139
+
140
+ # ... but do include any attachment filenames
141
+ attachment_info = if mail&.attachments&.any?
142
+ { attachments: mail.attachments.map { |a| { filename: a.filename } } }
143
+ else
144
+ {}
145
+ end
146
147
+ payload.merge(attachment_info)
148
149
150
151
class ActiveStorageSubscriber < NotificationSubscriber
0 commit comments