X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0d3a9ed9cb47ce3b89ea9eaffbb589f9a9ff6d22..ee530d8111c92999e1a495b5a23aea9319c1309c:/app/controllers/message_controller.rb diff --git a/app/controllers/message_controller.rb b/app/controllers/message_controller.rb index 94bee5d35..c6a269a06 100644 --- a/app/controllers/message_controller.rb +++ b/app/controllers/message_controller.rb @@ -38,6 +38,8 @@ class MessageController < ApplicationController message = Message.find(params[:message_id]) if message.to_user_id == @user.id then + message.update_attribute(:message_read, true) + @body = "On #{message.sent_on} #{message.sender.display_name} wrote:\n\n#{message.body.gsub(/^/, '> ')}" @title = @subject = "Re: #{message.title.sub(/^Re:\s*/, '')}" @this_user = User.find(message.from_user_id)