广播消息不发送未登录用户修复
This commit is contained in:
parent
bad7c44903
commit
ad390040d7
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user