How to use the botframework-directlinejs.ConnectionStatus.Uninitialized 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();
            }
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 => {
github microsoft / BotFramework-WebChat / src / Store.ts View on Github external
export const connection: Reducer = (
    state: ConnectionState = {
        connectionStatus: ConnectionStatus.Uninitialized,
        botConnection: undefined,
        selectedActivity: undefined,
        user: undefined,
        bot: undefined
    },
    action: ConnectionAction
) => {
    switch (action.type) {
        case 'Start_Connection':
            return {
                ...state,
                botConnection: action.botConnection,
                user: action.user,
                bot: action.bot,
                selectedActivity: action.selectedActivity
            };