From e39bb7f65faa42873b3ec536ab0a969b583f141a Mon Sep 17 00:00:00 2001 From: junleea <354425203@qq.com> Date: Sat, 22 Mar 2025 16:36:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=B5=8B=E5=80=BC=E6=9C=AA?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96map?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/imService.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/imService.go b/service/imService.go index 55a8dd4..1ed5d50 100644 --- a/service/imService.go +++ b/service/imService.go @@ -108,6 +108,9 @@ func WSReceiveMessageService(userID, sessionID int, channel string, msg proto.WS robotMsg += resp.Response if resp.Done { //该消息完成 actx = resp.Context + if actxMap == nil { + actxMap = make(map[int][]int) + } actxMap[sessionID] = actx //创建消息 err2, msgID := CreateMessage(2, sessionID, 2, userID, robotMsg, 1) //机器人id为2,消息类型为2,状态为1