A platform for community discussion. Free, open, simple.
FIX: Email::Sender expects type to be a string (#27463)
Ted Johanssona5df029be357
diff --git a/lib/email/sender.rb b/lib/email/sender.rbindex 02738081e86..d19bd65e58a 100644--- a/lib/email/sender.rb+++ b/lib/email/sender.rb@@ -253,7 +253,7 @@ module Emailif post.present?@stripped_secure_upload_shas = style.stripped_upload_sha_map.valuesadd_attachments(post)- elsif @email_type == :digest+ elsif @email_type.to_s == "digest"@stripped_secure_upload_shas = style.stripped_upload_sha_map.valuesdigest_posts.each { |p| add_attachments(p) }enddiff --git a/spec/lib/email/sender_spec.rb b/spec/lib/email/sender_spec.rbindex 91a633dc259..bb412a5176c 100644--- a/spec/lib/email/sender_spec.rb+++ b/spec/lib/email/sender_spec.rb@@ -659,7 +659,7 @@ RSpec.describe Email::Sender domessage.header["X-Discourse-Post-Id"] = nilmessage.header["X-Discourse-Post-Ids"] = "#{reply.id},#{other_post.id}"- Email::Sender.new(message, :digest).send+ Email::Sender.new(message, "digest").sendexpect(message.attachments.map(&:filename)).to include(*[image, @secure_image, @secure_image_2].map(&:original_filename),)