Added 'read' check; message name is only bold if unread
This commit is contained in:
@@ -16,7 +16,7 @@ class MessagerepliesController < ApplicationController
|
||||
@reply.user_author = current_user
|
||||
@reply.message = message
|
||||
if @reply.save
|
||||
@reply.message.update_attributes(user_hidden: nil)
|
||||
@reply.message.update_attributes(user_hidden: nil, read: false)
|
||||
if false
|
||||
@reply.send_new_message_reply_mail
|
||||
end
|
||||
|
||||
@@ -17,6 +17,7 @@ class MessagesController < ApplicationController
|
||||
end
|
||||
|
||||
def show
|
||||
Message.find(@message.id).update_attributes(read: true) if !@message.read && @message.user_target.is?(current_user)
|
||||
@replies = @message.replies.page(params[:page])
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user