diff --git a/internal/push/logic/push_to_client.go b/internal/push/logic/push_to_client.go index 8aeb6b82c..90e56c1f7 100644 --- a/internal/push/logic/push_to_client.go +++ b/internal/push/logic/push_to_client.go @@ -85,7 +85,6 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) { content = pushMsg.MsgData.OfflinePushInfo.Title log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "xxxx OfflinePushInfo", content) } else { - log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "xxxx2222 OfflinePushInfo", content) switch pushMsg.MsgData.ContentType { case constant.Text: content = constant.ContentType2PushContent[constant.Text] diff --git a/pkg/common/db/newRedisModel.go b/pkg/common/db/newRedisModel.go index 04bcd28c7..254a06975 100644 --- a/pkg/common/db/newRedisModel.go +++ b/pkg/common/db/newRedisModel.go @@ -111,13 +111,22 @@ func (d *DataBases) NewCacheSignalInfo(msg *pbCommon.MsgData) error { return err } //log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "SignalReq: ", req.String()) - switch req.Payload.(type) { - case *pbRtc.SignalReq_Invite, *pbRtc.SignalReq_InviteInGroup: - keyList := SignalListCache + msg.RecvID + var inviteeUserIDList []string + switch invitationInfo := req.Payload.(type) { + case *pbRtc.SignalReq_Invite: + inviteeUserIDList = invitationInfo.Invite.Invitation.InviteeUserIDList + case *pbRtc.SignalReq_InviteInGroup: + inviteeUserIDList = invitationInfo.InviteInGroup.Invitation.InviteeUserIDList + default: + log2.NewDebug("", utils.GetSelfFuncName(), "req type not invite", string(msg.Content)) + return nil + } + for _, userID := range inviteeUserIDList { timeout, err := strconv.Atoi(config.Config.Rtc.SignalTimeout) if err != nil { return err } + keyList := SignalListCache + userID err = d.rdb.LPush(context.Background(), keyList, msg.ClientMsgID).Err() if err != nil { return err @@ -132,8 +141,6 @@ func (d *DataBases) NewCacheSignalInfo(msg *pbCommon.MsgData) error { return err } return err - default: - log2.NewDebug("", utils.GetSelfFuncName(), "req type not invite", string(msg.Content)) } return nil }