mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +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
|
||||
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]
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user