Archive sessions on key changes after profile fetch
// FREEBIE
This commit is contained in:
		
					parent
					
						
							
								4232f5711c
							
						
					
				
			
			
				commit
				
					
						3acfda3a56
					
				
			
		
					 2 changed files with 16 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -589,8 +589,12 @@
 | 
			
		|||
            var identityKey = dcodeIO.ByteBuffer.wrap(profile.identityKey, 'base64').toArrayBuffer();
 | 
			
		||||
 | 
			
		||||
            return textsecure.storage.protocol.saveIdentity(
 | 
			
		||||
              id, identityKey, false
 | 
			
		||||
            );
 | 
			
		||||
                id, identityKey, false
 | 
			
		||||
            ).then(function(isIdentityChange) {
 | 
			
		||||
                if (isIdentityChange) {
 | 
			
		||||
                    return textsecure.storage.protocol.archiveAllSessions(id);
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue