From de27c6b4b99c120f478abaabdea55ea13c520000 Mon Sep 17 00:00:00 2001 From: riking Date: Fri, 1 Aug 2014 12:47:08 -0700 Subject: [PATCH] Revert bad diff --- lib/email/message_builder.rb | 2 +- lib/email/receiver.rb | 26 +++++++++++++------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/email/message_builder.rb b/lib/email/message_builder.rb index 20482788606..310f97f9ea5 100644 --- a/lib/email/message_builder.rb +++ b/lib/email/message_builder.rb @@ -49,7 +49,7 @@ module Email return unless html_override = @opts[:html_override] if @opts[:add_unsubscribe_link] - if response_instructions = @opts[:respond_instructions] + if response_instructions = @template_args[:respond_instructions] respond_instructions = PrettyText.cook(response_instructions).html_safe html_override.gsub!("%{respond_instructions}", respond_instructions) end diff --git a/lib/email/receiver.rb b/lib/email/receiver.rb index 94201f5f93f..13a36939263 100644 --- a/lib/email/receiver.rb +++ b/lib/email/receiver.rb @@ -67,19 +67,6 @@ module Email end end - def is_in_email? - @allow_strangers = false - return false unless SiteSetting.email_in - - category = Category.find_by_email(@message.to.first) - return false unless category - - @category_id = category.id - @allow_strangers = category.email_in_allow_strangers - - true - end - private def parse_body @@ -148,6 +135,19 @@ module Email @body.strip! end + def is_in_email? + @allow_strangers = false + return false unless SiteSetting.email_in + + category = Category.find_by_email(@message.to.first) + return false unless category + + @category_id = category.id + @allow_strangers = category.email_in_allow_strangers + + true + end + def wrap_body_in_quote @body = "[quote=\"#{@message.from.first}\"] #{@body}