mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-24 18:36:19 +08:00
singal offline push
This commit is contained in:
parent
4efdd342d6
commit
1a42f6dded
@ -140,6 +140,7 @@ func (d *DataBases) NewCacheSignalInfo(msg *pbCommon.MsgData) error {
|
|||||||
|
|
||||||
func (d *DataBases) GetSignalInfoFromCacheByClientMsgID(clientMsgID string) (invitationInfo *pbRtc.SignalInviteReq, err error) {
|
func (d *DataBases) GetSignalInfoFromCacheByClientMsgID(clientMsgID string) (invitationInfo *pbRtc.SignalInviteReq, err error) {
|
||||||
key := SignalCache + clientMsgID
|
key := SignalCache + clientMsgID
|
||||||
|
invitationInfo = &pbRtc.SignalInviteReq{}
|
||||||
bytes, err := d.rdb.Get(context.Background(), key).Bytes()
|
bytes, err := d.rdb.Get(context.Background(), key).Bytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -148,8 +149,12 @@ func (d *DataBases) GetSignalInfoFromCacheByClientMsgID(clientMsgID string) (inv
|
|||||||
if err = proto.Unmarshal(bytes, req); err != nil {
|
if err = proto.Unmarshal(bytes, req); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
req2 := req.Payload.(*pbRtc.SignalReq_Invite)
|
switch req2 := req.Payload.(type) {
|
||||||
invitationInfo = req2.Invite
|
case *pbRtc.SignalReq_Invite:
|
||||||
|
invitationInfo.Invitation = req2.Invite.Invitation
|
||||||
|
case *pbRtc.SignalReq_InviteInGroup:
|
||||||
|
invitationInfo.Invitation = req2.InviteInGroup.Invitation
|
||||||
|
}
|
||||||
return invitationInfo, err
|
return invitationInfo, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user