mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-30 12:19:38 +00:00
Fix "Undefined local variable sender_email" error in MailHandler#receive_message_reply when receiving a reply to a locked topic (#31503).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@18239 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
37b7578f0f
commit
7bb8ab5e24
@ -274,7 +274,7 @@ class MailHandler < ActionMailer::Base
|
||||
add_attachments(reply)
|
||||
reply
|
||||
else
|
||||
logger&.info "MailHandler: ignoring reply from [#{sender_email}] to a locked topic"
|
||||
logger&.info "MailHandler: ignoring reply from [#{email.from.first}] to a locked topic"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -1002,6 +1002,17 @@ class MailHandlerTest < ActiveSupport::TestCase
|
||||
assert_equal Message.find(1), m.parent
|
||||
end
|
||||
|
||||
def test_reply_to_a_locked_topic
|
||||
# Lock the topic
|
||||
topic = Message.find(2).parent
|
||||
topic.update_attribute :locked, true
|
||||
|
||||
assert_no_difference('topic.replies_count') do
|
||||
m = submit_email('message_reply_by_subject.eml')
|
||||
assert_not_kind_of Message, m
|
||||
end
|
||||
end
|
||||
|
||||
def test_should_convert_tags_of_html_only_emails
|
||||
with_settings :text_formatting => 'textile' do
|
||||
issue = submit_email('ticket_html_only.eml', :issue => {:project => 'ecookbook'})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user