_onConnectSuccess()

in src/core/chatController.js [221:241]


  _onConnectSuccess(response) {
    this.logger.info("Connect successful!");
    const responseObject = {
      _debug: response,
      connectSuccess: true,
      connectCalled: true,
      metadata: this.sessionMetadata
    };
    const eventData = Object.assign({
      chatDetails: this.getChatDetails()
    }, responseObject);
    this.pubsub.triggerAsync(CHAT_EVENTS.CONNECTION_ESTABLISHED, eventData);

    if (this._shouldAcknowledgeContact()) {
      this.sendEvent({
        contentType: CONTENT_TYPE.connectionAcknowledged
      });
    }

    return responseObject;
  }