mirror of
				https://github.com/openimsdk/open-im-server.git
				synced 2025-11-04 03:13:15 +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) {
 | 
			
		||||
	key := SignalCache + clientMsgID
 | 
			
		||||
	invitationInfo = &pbRtc.SignalInviteReq{}
 | 
			
		||||
	bytes, err := d.rdb.Get(context.Background(), key).Bytes()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
@ -148,8 +149,12 @@ func (d *DataBases) GetSignalInfoFromCacheByClientMsgID(clientMsgID string) (inv
 | 
			
		||||
	if err = proto.Unmarshal(bytes, req); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	req2 := req.Payload.(*pbRtc.SignalReq_Invite)
 | 
			
		||||
	invitationInfo = req2.Invite
 | 
			
		||||
	switch req2 := req.Payload.(type) {
 | 
			
		||||
	case *pbRtc.SignalReq_Invite:
 | 
			
		||||
		invitationInfo.Invitation = req2.Invite.Invitation
 | 
			
		||||
	case *pbRtc.SignalReq_InviteInGroup:
 | 
			
		||||
		invitationInfo.Invitation = req2.InviteInGroup.Invitation
 | 
			
		||||
	}
 | 
			
		||||
	return invitationInfo, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user