mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-25 02:58:26 +08:00
singal offline push
This commit is contained in:
parent
538656fcc7
commit
f8b4cbcc13
@ -85,7 +85,6 @@ func MsgToUser(pushMsg *pbPush.PushMsgReq) {
|
|||||||
content = pushMsg.MsgData.OfflinePushInfo.Title
|
content = pushMsg.MsgData.OfflinePushInfo.Title
|
||||||
log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "xxxx OfflinePushInfo", content)
|
log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "xxxx OfflinePushInfo", content)
|
||||||
} else {
|
} else {
|
||||||
log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "xxxx2222 OfflinePushInfo", content)
|
|
||||||
switch pushMsg.MsgData.ContentType {
|
switch pushMsg.MsgData.ContentType {
|
||||||
case constant.Text:
|
case constant.Text:
|
||||||
content = constant.ContentType2PushContent[constant.Text]
|
content = constant.ContentType2PushContent[constant.Text]
|
||||||
|
@ -111,13 +111,22 @@ func (d *DataBases) NewCacheSignalInfo(msg *pbCommon.MsgData) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
//log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "SignalReq: ", req.String())
|
//log.NewDebug(pushMsg.OperationID, utils.GetSelfFuncName(), "SignalReq: ", req.String())
|
||||||
switch req.Payload.(type) {
|
var inviteeUserIDList []string
|
||||||
case *pbRtc.SignalReq_Invite, *pbRtc.SignalReq_InviteInGroup:
|
switch invitationInfo := req.Payload.(type) {
|
||||||
keyList := SignalListCache + msg.RecvID
|
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)
|
timeout, err := strconv.Atoi(config.Config.Rtc.SignalTimeout)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
keyList := SignalListCache + userID
|
||||||
err = d.rdb.LPush(context.Background(), keyList, msg.ClientMsgID).Err()
|
err = d.rdb.LPush(context.Background(), keyList, msg.ClientMsgID).Err()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -132,8 +141,6 @@ func (d *DataBases) NewCacheSignalInfo(msg *pbCommon.MsgData) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
default:
|
|
||||||
log2.NewDebug("", utils.GetSelfFuncName(), "req type not invite", string(msg.Content))
|
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user