aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/outgoing_message.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/outgoing_message.rb')
-rw-r--r--app/models/outgoing_message.rb14
1 files changed, 11 insertions, 3 deletions
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb
index a9244c652..fdd950ba5 100644
--- a/app/models/outgoing_message.rb
+++ b/app/models/outgoing_message.rb
@@ -21,7 +21,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: outgoing_message.rb,v 1.20 2008-01-10 18:12:10 francis Exp $
+# $Id: outgoing_message.rb,v 1.21 2008-01-10 19:59:33 francis Exp $
class OutgoingMessage < ActiveRecord::Base
belongs_to :info_request
@@ -110,8 +110,17 @@ class OutgoingMessage < ActiveRecord::Base
end
end
+ # Returns the text to quote the original message when sending this one
+ def get_quoted_part_of_followup
+ if self.message_type == 'followup' && !self.incoming_message_followup.nil?
+ return "\n\n-----Original Message-----\n\n" + self.incoming_message_followup.get_body_for_quoting + "\n"
+ else
+ return ""
+ end
+ end
+
# Return body for display as HTML
- def get_body_for_display
+ def get_body_for_html_display
text = body
text = MySociety::Format.make_clickable(text, :contract => 1)
text = text.gsub(/\n/, '<br>')
@@ -119,7 +128,6 @@ class OutgoingMessage < ActiveRecord::Base
return text
end
-
end