lib/sidekiq/extensions/action_mailer.rb in sidekiq-6.3.1 vs lib/sidekiq/extensions/action_mailer.rb in sidekiq-6.4.0

- old
+ new

@@ -14,11 +14,11 @@ # UserMailer.delay_until(5.days.from_now).send_welcome_email(new_user) class DelayedMailer include Sidekiq::Worker def perform(yml) - (target, method_name, args) = YAML.load(yml) - msg = target.public_send(method_name, *args) + (target, method_name, args, kwargs) = YAML.load(yml) + msg = kwargs.empty? ? target.public_send(method_name, *args) : target.public_send(method_name, *args, **kwargs) # The email method can return nil, which causes ActionMailer to return # an undeliverable empty message. if msg msg.deliver_now else