debug3
This commit is contained in:
parent
eaf04ae02d
commit
e97bd859fc
@ -194,8 +194,8 @@ func (o *ChatRoom) Register(c *Client) (sessionId string) {
|
||||
// message: 消息内容
|
||||
func (o *ChatRoom) SendSessionMessage(sender *accountFiee.ChatUserData, sessionId string, msgType WsType, message any) (userIdInSession []int64, err error) {
|
||||
fmt.Println("ChatRoom.SendSessionMessage ------------------1")
|
||||
//o.clientsRwLocker.Lock()
|
||||
//defer o.clientsRwLocker.Unlock()
|
||||
o.clientsRwLocker.Lock()
|
||||
defer o.clientsRwLocker.Unlock()
|
||||
var msg = WsSessionInfo{
|
||||
Type: msgType,
|
||||
Content: message,
|
||||
|
@ -99,7 +99,7 @@ func (cr ChatCache) GetChatRecord(sessionId string) (data []*accountFiee.ChatRec
|
||||
//log.Print("获取聊天记录失败", zap.Error(err))
|
||||
return
|
||||
}
|
||||
fmt.Printf("cache data: %+v", string(messages))
|
||||
//fmt.Printf("cache data: %+v", string(messages))
|
||||
if len(messages) > 0 {
|
||||
_ = json.Unmarshal(messages, &data)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user