修复赋值未初始化map
This commit is contained in:
parent
33971ef5c7
commit
e39bb7f65f
|
|
@ -108,6 +108,9 @@ func WSReceiveMessageService(userID, sessionID int, channel string, msg proto.WS
|
||||||
robotMsg += resp.Response
|
robotMsg += resp.Response
|
||||||
if resp.Done { //该消息完成
|
if resp.Done { //该消息完成
|
||||||
actx = resp.Context
|
actx = resp.Context
|
||||||
|
if actxMap == nil {
|
||||||
|
actxMap = make(map[int][]int)
|
||||||
|
}
|
||||||
actxMap[sessionID] = actx
|
actxMap[sessionID] = actx
|
||||||
//创建消息
|
//创建消息
|
||||||
err2, msgID := CreateMessage(2, sessionID, 2, userID, robotMsg, 1) //机器人id为2,消息类型为2,状态为1
|
err2, msgID := CreateMessage(2, sessionID, 2, userID, robotMsg, 1) //机器人id为2,消息类型为2,状态为1
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue