fix and add some message feature

This commit is contained in:
2021-09-16 16:54:49 +08:00
parent b8a52107a5
commit dbcbc01251
24 changed files with 250 additions and 89 deletions

View File

@@ -91,8 +91,12 @@ class UsersController < ApplicationController
def get_user_info
begin
@user = current_user
result = Notice::Read::CountService.call(current_user.id)
@message_unread_total = result.nil? ? 0 : result[2]["unread_notification"]
begin
result = Notice::Read::CountService.call(current_user.id)
@message_unread_total = result.nil? ? 0 : result[2]["unread_notification"]
rescue
@message_unread_total = 0
end
# TODO 等消息上线再打开注释
#@tidding_count = unviewed_tiddings(current_user) if current_user.present?
rescue Exception => e