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