Show Session Switchover Events
Co-authored-by: Scott Nonnenberg <scott@signal.org>
This commit is contained in:
		
					parent
					
						
							
								70cd073a72
							
						
					
				
			
			
				commit
				
					
						dd2493a353
					
				
			
		
					 13 changed files with 455 additions and 17 deletions
				
			
		| 
						 | 
				
			
			@ -1467,6 +1467,18 @@ export class SignalProtocolStore extends EventEmitter {
 | 
			
		|||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  async hasSessionWith(serviceId: ServiceIdString): Promise<boolean> {
 | 
			
		||||
    return this.withZone(GLOBAL_ZONE, 'hasSessionWith', async () => {
 | 
			
		||||
      if (!this.sessions) {
 | 
			
		||||
        throw new Error('getOpenDevices: this.sessions not yet cached!');
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      return this._getAllSessions().some(
 | 
			
		||||
        ({ fromDB }) => fromDB.serviceId === serviceId
 | 
			
		||||
      );
 | 
			
		||||
    });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  async getOpenDevices(
 | 
			
		||||
    ourServiceId: ServiceIdString,
 | 
			
		||||
    serviceIds: ReadonlyArray<ServiceIdString>,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue