Merge pull request #10097 from colinux/fix-email-event-with-invalid-to-fields

Tech: pas d'erreur EmailEvent lorsque le message ne peut pas avoir plusieurs destinataires
This commit is contained in:
Colin Darie 2024-03-12 15:29:52 +00:00 committed by GitHub
commit a8a23f55a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,7 +15,7 @@ class EmailEvent < ApplicationRecord
class << self
def create_from_message!(message, status:)
to = message.to || ["unset"] # no recipients when error occurs *before* setting to: in the mailer
to = message.to_addrs || ["unset"] # no recipients when error occurs *before* setting to: in the mailer
to.each do |recipient|
EmailEvent.create!(