mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-28 04:48:44 +08:00
rtc
This commit is contained in:
parent
9c1ca78fed
commit
d7884f89f5
@ -124,7 +124,7 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
// save invitation info for offline push
|
// save invitation info for offline push
|
||||||
if err := db.DB.HandleSignalInfo(pushMsg.MsgData); err != nil {
|
if err := db.DB.HandleSignalInfo(pushMsg.OperationID, pushMsg.MsgData); err != nil {
|
||||||
log.NewError(pushMsg.OperationID, utils.GetSelfFuncName(), err.Error(), pushMsg.MsgData)
|
log.NewError(pushMsg.OperationID, utils.GetSelfFuncName(), err.Error(), pushMsg.MsgData)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ func (d *DataBases) CleanUpOneUserAllMsgFromRedis(userID string, operationID str
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (d *DataBases) HandleSignalInfo(msg *pbCommon.MsgData) error {
|
func (d *DataBases) HandleSignalInfo(operationID string, msg *pbCommon.MsgData) error {
|
||||||
req := &pbRtc.SignalReq{}
|
req := &pbRtc.SignalReq{}
|
||||||
if err := proto.Unmarshal(msg.Content, req); err != nil {
|
if err := proto.Unmarshal(msg.Content, req); err != nil {
|
||||||
return err
|
return err
|
||||||
@ -126,11 +126,13 @@ func (d *DataBases) HandleSignalInfo(msg *pbCommon.MsgData) error {
|
|||||||
case *pbRtc.SignalReq_HungUp, *pbRtc.SignalReq_Cancel, *pbRtc.SignalReq_Reject, *pbRtc.SignalReq_Accept:
|
case *pbRtc.SignalReq_HungUp, *pbRtc.SignalReq_Cancel, *pbRtc.SignalReq_Reject, *pbRtc.SignalReq_Accept:
|
||||||
return errors.New("signalInfo do not need offlinePush")
|
return errors.New("signalInfo do not need offlinePush")
|
||||||
default:
|
default:
|
||||||
log2.NewDebug("", utils.GetSelfFuncName(), "req invalid type", string(msg.Content))
|
log2.NewDebug(operationID, utils.GetSelfFuncName(), "req invalid type", string(msg.Content))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if isInviteSignal {
|
if isInviteSignal {
|
||||||
|
log2.NewInfo(operationID, utils.GetSelfFuncName(), "invite userID list:", inviteeUserIDList)
|
||||||
for _, userID := range inviteeUserIDList {
|
for _, userID := range inviteeUserIDList {
|
||||||
|
log2.NewInfo(operationID, utils.GetSelfFuncName(), "invite userID:", userID)
|
||||||
timeout, err := strconv.Atoi(config.Config.Rtc.SignalTimeout)
|
timeout, err := strconv.Atoi(config.Config.Rtc.SignalTimeout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user