From 8dc0b639a229da3033c1e9371dddc32301d4568d Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Wed, 22 Mar 2023 18:42:42 +0800 Subject: [PATCH] signal both push --- internal/msg_gateway/gate/relay_rpc_server.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/msg_gateway/gate/relay_rpc_server.go b/internal/msg_gateway/gate/relay_rpc_server.go index 676e2a100..d168adc00 100644 --- a/internal/msg_gateway/gate/relay_rpc_server.go +++ b/internal/msg_gateway/gate/relay_rpc_server.go @@ -205,13 +205,18 @@ func (r *RPCServer) SuperGroupOnlineBatchPushOneMsg(_ context.Context, req *pbRe RecvID: v, RecvPlatFormID: int32(platform), } - if !userConn.IsBackground || req.MsgData.ContentType == constant.SuperGroupUpdateNotification { + if !userConn.IsBackground || req.MsgData.ContentType == constant.SuperGroupUpdateNotification || req.MsgData.ContentType == constant.SignalingNotification { resultCode := sendMsgBatchToUser(userConn, replyBytes.Bytes(), req, platform, v) if resultCode == 0 && utils.IsContainInt(platform, r.pushTerminal) { tempT.OnlinePush = true promePkg.PromeInc(promePkg.MsgOnlinePushSuccessCounter) log.Info(req.OperationID, "PushSuperMsgToUser is success By Ws", "args", req.String(), "recvPlatForm", constant.PlatformIDToName(platform), "recvID", v) temp.ResultCode = resultCode + if req.MsgData.ContentType == constant.SignalingNotification && userConn.IsBackground { + log.Info(req.OperationID, "recv signalingNotification backgroud", req.MsgData.String()) + temp.ResultCode = -2 + tempT.OnlinePush = false + } resp = append(resp, temp) } } else {