处理离线用户消息发送

This commit is contained in:
liwei 2023-07-14 18:55:56 +08:00
parent ae792300ad
commit 51cc35d65f

View File

@ -145,7 +145,7 @@ func (this *UserSession) Polls() []*pb.UserMessage {
// 推送消息到用户
func (this *UserSession) Push() (err error) {
// reply := &pb.RPCMessageReply{}
if len(this.msgqueue) > 0 {
if this.ServiceTag != "" && this.SessionId != "" && len(this.msgqueue) > 0 {
if _, err = this.service.AcrossClusterRpcGo(context.Background(), this.ServiceTag, fmt.Sprintf("%s/%s", Service_Gateway, this.GatewayServiceId), string(Rpc_GatewayAgentSendMsg), &pb.AgentSendMessageReq{
UserSessionId: this.SessionId,
Reply: this.msgqueue,