How to use the botframework-directlinejs.ConnectionStatus.Connecting function in botframework-directlinejs

To help you get started, we’ve selected a few botframework-directlinejs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aiden / autobot / src / clients / botframework_client.ts View on Github external
.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.
github microsoft / BotBuilder-Samples / samples / javascript_es6 / 01.browser-echo / src / webChatAdapter.ts View on Github external
connectionStatus$: new Observable(observer => {
                observer.next(ConnectionStatus.Uninitialized);
                observer.next(ConnectionStatus.Connecting);
                observer.next(ConnectionStatus.Online);
            }),
            activity$: new Observable(observer => {