From ad390040d77a75d05da95719d883b0bcb3d4ae3a Mon Sep 17 00:00:00 2001 From: liwei1dao Date: Thu, 18 Aug 2022 10:28:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=BF=E6=92=AD=E6=B6=88=E6=81=AF=E4=B8=8D?= =?UTF-8?q?=E5=8F=91=E9=80=81=E6=9C=AA=E7=99=BB=E5=BD=95=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/gateway/agentmgr_comp.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/gateway/agentmgr_comp.go b/modules/gateway/agentmgr_comp.go index 5a071e353..fe4960c80 100644 --- a/modules/gateway/agentmgr_comp.go +++ b/modules/gateway/agentmgr_comp.go @@ -137,7 +137,10 @@ func (this *AgentMgrComp) SendMsgToAgents(ctx context.Context, args *pb.BatchMes this.module.Debugf("SendMsgToAgents: agents:%v msg:%v", args.UserSessionIds, msg) for _, v := range args.UserSessionIds { if a, ok := this.agents.Load(v); ok { - a.(IAgent).WriteMsg(msg) + agent := a.(IAgent) + if agent.UserId() != "" { //自发送登录用户 + agent.WriteMsg(msg) + } } } return nil