diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/incoming_message.rb | 4 | ||||
-rw-r--r-- | app/views/track_mailer/event_digest.rhtml | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 3f625f539..b5e461e81 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -19,7 +19,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: incoming_message.rb,v 1.129 2008-08-09 15:19:01 francis Exp $ +# $Id: incoming_message.rb,v 1.130 2008-08-15 00:50:33 francis Exp $ # TODO # Move some of the (e.g. quoting) functions here into rblib, as they feel @@ -205,7 +205,7 @@ class IncomingMessage < ActiveRecord::Base # XXX can later display some of these special emails as actual emails, # if they are public anyway. For now just be precautionary and only # put in descriptions of them in square brackets. - if info_request.public_body.is_requestable? + if self.info_request.public_body.is_requestable? text = text.gsub(self.info_request.public_body.request_email, "[" + self.info_request.public_body.short_or_long_name + " request email]") end text = text.gsub(self.info_request.incoming_email, "[FOI #" + self.info_request.id.to_s + " email]") diff --git a/app/views/track_mailer/event_digest.rhtml b/app/views/track_mailer/event_digest.rhtml index a6b4a2729..20f793c3d 100644 --- a/app/views/track_mailer/event_digest.rhtml +++ b/app/views/track_mailer/event_digest.rhtml @@ -39,6 +39,8 @@ extract = highlight_and_excerpt(event.outgoing_message.body_without_salutation, @highlight_words, 150, false) elsif not event.incoming_message.nil? extract = highlight_and_excerpt(event.incoming_message.get_text_for_indexing, @highlight_words, 150, false) + elsif not event.comment.nil? + extract = highlight_and_excerpt(event.comment.body, @highlight_words, 150, false) else extract = highlight_and_excerpt(info_request.initial_request_text, @highlight_words, 150, false) end |