Show verified/keychange notifications when actually relevant
FREEBIE
This commit is contained in:
		
					parent
					
						
							
								3d445fe549
							
						
					
				
			
			
				commit
				
					
						20451cc827
					
				
			
		
					 6 changed files with 52 additions and 14 deletions
				
			
		| 
						 | 
				
			
			@ -38493,13 +38493,17 @@ MessageReceiver.prototype.extend({
 | 
			
		|||
            throw new Error('Got empty SyncMessage');
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    handleVerified: function(verified) {
 | 
			
		||||
    handleVerified: function(verified, options) {
 | 
			
		||||
        options = options || {};
 | 
			
		||||
        _.defaults(options, {viaContactSync: false});
 | 
			
		||||
 | 
			
		||||
        var ev = new Event('verified');
 | 
			
		||||
        ev.verified = {
 | 
			
		||||
            state: verified.state,
 | 
			
		||||
            destination: verified.destination,
 | 
			
		||||
            identityKey: verified.identityKey.toArrayBuffer()
 | 
			
		||||
        };
 | 
			
		||||
        ev.viaContactSync = options.viaContactSync;
 | 
			
		||||
        this.dispatchEvent(ev);
 | 
			
		||||
    },
 | 
			
		||||
    handleRead: function(read, timestamp) {
 | 
			
		||||
| 
						 | 
				
			
			@ -38526,7 +38530,7 @@ MessageReceiver.prototype.extend({
 | 
			
		|||
                eventTarget.dispatchEvent(ev);
 | 
			
		||||
 | 
			
		||||
                if (contactDetails.verified) {
 | 
			
		||||
                    this.handleVerified(contactDetails.verified);
 | 
			
		||||
                    this.handleVerified(contactDetails.verified, {viaContactSync: true});
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                contactDetails = contactBuffer.next();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue