diff --git a/app/controllers/dmails_controller.rb b/app/controllers/dmails_controller.rb index 2d1fdb4f8..dd31feaf1 100644 --- a/app/controllers/dmails_controller.rb +++ b/app/controllers/dmails_controller.rb @@ -44,6 +44,7 @@ class DmailsController < ApplicationController def destroy @dmail = Dmail.find(params[:id]) check_privilege(@dmail) + @dmail.mark_as_read! @dmail.destroy redirect_to dmails_path, :notice => "Message destroyed" end