push message update

This commit is contained in:
Gordon 2023-03-15 18:36:44 +08:00
parent cb1487109a
commit 0bd2c00088

View File

@ -259,17 +259,12 @@ func (r *RPCServer) SuperGroupBackgroundOnlinePush(_ context.Context, req *pbRel
RecvID: v, RecvID: v,
RecvPlatFormID: int32(platform), RecvPlatFormID: int32(platform),
} }
if !userConn.IsBackground { resultCode := sendMsgBatchToUser(userConn, replyBytes.Bytes(), req, platform, v)
resultCode := sendMsgBatchToUser(userConn, replyBytes.Bytes(), req, platform, v) if resultCode == 0 && utils.IsContainInt(platform, r.pushTerminal) {
if resultCode == 0 && utils.IsContainInt(platform, r.pushTerminal) { tempT.OnlinePush = true
tempT.OnlinePush = true promePkg.PromeInc(promePkg.MsgOnlinePushSuccessCounter)
promePkg.PromeInc(promePkg.MsgOnlinePushSuccessCounter) log.Info(req.OperationID, "PushSuperMsgToUser is success By Ws", "args", req.String(), "recvPlatForm", constant.PlatformIDToName(platform), "recvID", v)
log.Info(req.OperationID, "PushSuperMsgToUser is success By Ws", "args", req.String(), "recvPlatForm", constant.PlatformIDToName(platform), "recvID", v) temp.ResultCode = resultCode
temp.ResultCode = resultCode
resp = append(resp, temp)
}
} else {
temp.ResultCode = -2
resp = append(resp, temp) resp = append(resp, temp)
} }
} }