diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-11-15 09:53:43 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-11-15 09:53:43 +0000 |
commit | 2a96a18f3fd7dea4936d5056bf24a32be0263d9a (patch) | |
tree | dc2b14c5b674dc8e645db670fa1c49f5feb33a44 | |
parent | 290833aa4c02b1167cf9e765fa4d3249b88ac277 (diff) |
Move access to mail message id to incoming message.
-rw-r--r-- | app/models/incoming_message.rb | 4 | ||||
-rw-r--r-- | app/models/info_request.rb | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index 43809074a..5205d0a2d 100644 --- a/app/models/incoming_message.rb +++ b/app/models/incoming_message.rb @@ -103,6 +103,10 @@ class IncomingMessage < ActiveRecord::Base (self.mail.envelope_to || [])).uniq end + def message_id + self.mail.message_id + end + # Returns the name of the person the incoming message is from, or nil if # there isn't one or if there is only an email address. XXX can probably # remove from_name_if_present (which is a monkey patch) by just calling diff --git a/app/models/info_request.rb b/app/models/info_request.rb index b792e6819..e1885dee6 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -414,8 +414,7 @@ public end for im in self.incoming_messages - other_message_id = im.mail.message_id - if message_id == other_message_id + if message_id == im.message_id return true end end |