]> git.openstreetmap.org Git - rails.git/blobdiff - script/deliver-message
Link to the Markdown spec
[rails.git] / script / deliver-message
index 7382f251adfa5c4cdec2a2cabf621253be67ac7e..6dffea96cbff9633dcc023f9f8a6cc7937c18c2a 100755 (executable)
@@ -14,12 +14,12 @@ else
   digest = message.digest
   from = message.recipient
   to = message.sender
-
-  message.update_attribute(:message_read, true)
 end
 
 exit 0 unless recipient[3] == digest[0,6]
 
+message.update_attribute(:message_read, true) if message
+
 mail = Mail.new(STDIN.readlines.join)
 
 if mail.multipart?