Update chat.go
This commit is contained in:
parent
7b76dd5142
commit
ac5fe7a266
@ -65,13 +65,15 @@ func NewMessage(ctx context.Context, cache *chatCache.ChatCache, sender *account
|
|||||||
return errors.New("消息发送失败")
|
return errors.New("消息发送失败")
|
||||||
}
|
}
|
||||||
fmt.Println("NewMessage 5 消息数量+1")
|
fmt.Println("NewMessage 5 消息数量+1")
|
||||||
|
if sender.Role != 3 {
|
||||||
//新消息数量统计+1
|
//新消息数量统计+1
|
||||||
noticeUserId := consts.ChatRoom.GetUserIdInSession(request.SessionId, sender.ID)
|
noticeUserId := consts.ChatRoom.GetUserIdInSession(request.SessionId, sender.ID)
|
||||||
fmt.Println("NewMessage 5.1 消息数量配置结束")
|
fmt.Println("NewMessage 5.1 消息数量配置结束")
|
||||||
fmt.Printf("noticeUserId %+v\n", noticeUserId)
|
fmt.Printf("noticeUserId %+v\n", noticeUserId)
|
||||||
for _, userId := range noticeUserId {
|
for _, userId := range noticeUserId {
|
||||||
fmt.Println("userId")
|
fmt.Println("userId")
|
||||||
cache.IncreaseNewMessageTotal(userId, request.SessionId)
|
_ = cache.IncreaseNewMessageTotal(userId, request.SessionId)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
fmt.Println("NewMessage 6")
|
fmt.Println("NewMessage 6")
|
||||||
//发送websocket消息提醒通知
|
//发送websocket消息提醒通知
|
||||||
|
Loading…
Reference in New Issue
Block a user