]> git.openstreetmap.org Git - rails.git/commitdiff
Mark a message as read when we receive an email reply to it
authorTom Hughes <tom@compton.nu>
Fri, 16 Mar 2012 15:17:50 +0000 (15:17 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 16 Mar 2012 15:17:50 +0000 (15:17 +0000)
script/deliver-message

index 669e54a667fef1459b1e9c206d76c8affc4333f7..7382f251adfa5c4cdec2a2cabf621253be67ac7e 100755 (executable)
@@ -14,6 +14,8 @@ else
   digest = message.digest
   from = message.recipient
   to = message.sender
   digest = message.digest
   from = message.recipient
   to = message.sender
+
+  message.update_attribute(:message_read, true)
 end
 
 exit 0 unless recipient[3] == digest[0,6]
 end
 
 exit 0 unless recipient[3] == digest[0,6]