修改未读消息500问题

This commit is contained in:
huang 2015-10-10 11:43:41 +08:00
parent 8729399925
commit a0f0ecf86d
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ class UsersController < ApplicationController
messages = MessageAll.where("user_id =?", @user).order("created_at desc")
messages.each do |message_all|
# 在点击或者刷新消息列表后未读的消息存放在数组
if message_all.message.viewed == 0
if message_all.message_type != "SystemMessage" && message_all.message.viewed == 0
@message_alls << message_all.message
end
end