X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/eaad3611b8560966b8126abbae3828a15d768533..753c179085b37635897121605dda867acc19a4a5:/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)