aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/incoming_message.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index fd7b226a6..bf05cb0d1 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -65,6 +65,12 @@ class IncomingMessage < ActiveRecord::Base
'application/zip' => 1,
}
+ # Given that there are in theory many info request events, a convenience method for
+ # getting the response event
+ def response_event
+ self.info_request_events.detect{ |e| e.event_type == 'response' }
+ end
+
# Return a cached structured mail object
def mail(force = nil)
if (!force.nil? || @mail.nil?) && !self.raw_email.nil?