Commit df179c15 authored by Michał "rysiek" Woźniak's avatar Michał "rysiek" Woźniak 🔒

needed access to the incoming e-mail (as per @paz's comments in !302)

parent d17779b9
Pipeline #33346 failed with stages
in 15 minutes and 40 seconds
......@@ -341,7 +341,7 @@ module Schleuder
true
end
def send_to_subscriptions(mail)
def send_to_subscriptions(mail, incoming_mail=nil)
logger.debug "Sending to subscriptions."
mail.add_internal_footer!
self.subscriptions.each do |subscription|
......@@ -352,7 +352,7 @@ module Schleuder
next
end
if ! self.deliver_selfsent && mail.was_validly_signed? && ( subscription == mail.signer )
if ! self.deliver_selfsent && incoming_mail.was_validly_signed? && ( subscription == incoming_mail.signer )
logger.info "Not sending to #{subscription.email}: delivery of self sent is disabled."
next
end
......
......@@ -46,7 +46,7 @@ module Schleuder
# Subscriptions
logger.debug "Creating clean copy of message"
copy = @mail.clean_copy(list.headers_to_meta.any?)
list.send_to_subscriptions(copy)
list.send_to_subscriptions(copy, @mail)
nil
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment