Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.subscribe((connectionStatus) => {
this.conectionStatus = connectionStatus;
switch (connectionStatus) {
case ConnectionStatus.Uninitialized:
// the status when the DirectLine object is first created/constructed
break;
case ConnectionStatus.Connecting:
// currently trying to connect to the conversation
if (program.verbose) {
console.log('Connecting to DirectLine...');
}
break;
case ConnectionStatus.Online:
// successfully connected to the converstaion. Connection is healthy so far as we know.
if (program.verbose) {
console.log('Connected to DirectLine.');
}
if (this.onReadyCb) {
this.onReadyCb();
}
break;
case ConnectionStatus.ExpiredToken:
// last operation errored out with an expired token. Your app should supply a new one.
connectionStatus$: new Observable(observer => {
observer.next(ConnectionStatus.Uninitialized);
observer.next(ConnectionStatus.Connecting);
observer.next(ConnectionStatus.Online);
}),
activity$: new Observable(observer => {