@twilio/conversations 2.6.3 → 2.6.4-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -77,7 +77,7 @@ To consume securely use the following script snippet format:
77
77
 
78
78
  ```html
79
79
  <script
80
- src="https://sdk.twilio.com/js/conversations/releases/2.6.3/twilio-conversations.min.js"
80
+ src="https://sdk.twilio.com/js/conversations/releases/2.6.4/twilio-conversations.min.js"
81
81
  integrity="sha256-<HASH FROM THE CHANGELOGS PAGE>"
82
82
  crossorigin="anonymous"
83
83
  ></script>
@@ -8030,7 +8030,7 @@ function PushNotification(data) {
8030
8030
  this.data = data.data || {};
8031
8031
  });
8032
8032
 
8033
- var version = "2.6.3";
8033
+ var version = "2.6.4-rc.1";
8034
8034
 
8035
8035
  function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
8036
8036
 
@@ -9614,6 +9614,12 @@ var Client = Client_1 = (_class = /*#__PURE__*/function (_ReplayEventEmitter) {
9614
9614
 
9615
9615
  if (startTwilsock) {
9616
9616
  _this._services.twilsockClient.connect();
9617
+ } else {
9618
+ var currentState = _this._services.twilsockClient.state;
9619
+
9620
+ if (currentState === "disconnected" || currentState === "unknown") {
9621
+ Client_1._logger.debug("TwilsockClient was passed externally and is not connected.");
9622
+ }
9617
9623
  }
9618
9624
 
9619
9625
  return _this;
@@ -10514,8 +10520,19 @@ var Client = Client_1 = (_class = /*#__PURE__*/function (_ReplayEventEmitter) {
10514
10520
  var _this6 = this;
10515
10521
 
10516
10522
  this._ensureReady = new Promise(function (resolve, reject) {
10517
- _this6._resolveEnsureReady = resolve;
10518
- _this6._rejectEnsureReady = reject;
10523
+ _this6._resolveEnsureReady = function () {
10524
+ Client_1._logger.debug("ConversationsClient initialized");
10525
+
10526
+ resolve();
10527
+
10528
+ _this6.emit(Client_1.initialized);
10529
+ };
10530
+
10531
+ _this6._rejectEnsureReady = function (error) {
10532
+ Client_1._logger.debug("ConversationsClient initialization failed", error);
10533
+
10534
+ reject(error);
10535
+ };
10519
10536
  }).catch(function (error) {
10520
10537
  if (throwErrorsAlways) {
10521
10538
  throw error;
@@ -10523,6 +10540,12 @@ var Client = Client_1 = (_class = /*#__PURE__*/function (_ReplayEventEmitter) {
10523
10540
  return void 0;
10524
10541
  }
10525
10542
  });
10543
+
10544
+ if (throwErrorsAlways) {
10545
+ this._ensureReady.catch(function (error) {
10546
+ Client_1._logger.error("ConversationsClient initialization failed", error);
10547
+ });
10548
+ }
10526
10549
  }
10527
10550
  }], [{
10528
10551
  key: "create",