@twilio/conversations 3.0.0-rc.7 → 3.0.0-rc.8

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/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.0.0-rc.8](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@3.0.0-rc.7...@twilio/conversations@3.0.0-rc.8) (2022-05-18)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Fix convo 3.0 docs, and disconnecting client issue ([c65cf01](https://github.com/twilio/rtd-sdk-monorepo-js/commit/c65cf011406a80ca83da7ecba961aa31caf061bf))
12
+ * Fix double parsing participant attributes ([682ed94](https://github.com/twilio/rtd-sdk-monorepo-js/commit/682ed94c791a4b2bc9dac6aa987f9aae80201365))
13
+
14
+
15
+ ### Reverts
16
+
17
+ * Revert "chore(release): Publish" ([097a200](https://github.com/twilio/rtd-sdk-monorepo-js/commit/097a2004f233688bf9a97d1defc976a9fb5da96d))
18
+ * Revert "chore(release): Publish" ([03b27ca](https://github.com/twilio/rtd-sdk-monorepo-js/commit/03b27ca9830bc6aba2d37febebe6e53f7abddb2d))
19
+
20
+
21
+
6
22
  ## [3.0.0-rc.5](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@3.0.0-rc.4...@twilio/conversations@3.0.0-rc.5) (2022-05-04)
7
23
 
8
24
 
package/README.md CHANGED
@@ -38,7 +38,7 @@ import { Client } from '@twilio/conversations';
38
38
  const client = new Client(token);
39
39
  // Before you use the client, subscribe to the `'stateChanged'` event and wait
40
40
  // for the `'initialized'` state to be reported.
41
- client.on('stateChanged', (state) => {
41
+ client.on('stateChanged', ({ state, error }) => {
42
42
  if (state === 'initialized') {
43
43
  // Use the client
44
44
  }
@@ -50,7 +50,7 @@ client.on('stateChanged', (state) => {
50
50
  Releases of `twilio-conversations.js` are hosted on a CDN, and you can include these
51
51
  directly in your web app using a `<script>` tag.
52
52
  ```html
53
- <script src="https://media.twiliocdn.com/sdk/js/conversations/v3.0.0/twilio-conversations.min.js"></script>
53
+ <script src="https://media.twiliocdn.com/sdk/js/conversations/v3.0/twilio-conversations.min.js"></script>
54
54
  ```
55
55
  Using this method, `twilio-conversations.js` will set a browser global `Twilio.Conversations` through which you can use the client:
56
56
  ```
package/builds/browser.js CHANGED
@@ -1767,7 +1767,7 @@ var Participants = /*#__PURE__*/function (_ReplayEventEmitter) {
1767
1767
  sid = data.sid, responseAttributes = data.attributes, dateCreated = data.date_created, dateUpdated = data.date_updated, responseIdentity = data.identity, roleSid = data.role_sid, messagingBinding = data.messaging_binding;
1768
1768
  _context2.next = 3;
1769
1769
  return this.upsertParticipant(sid, {
1770
- attributes: JSON.parse(responseAttributes),
1770
+ attributes: responseAttributes,
1771
1771
  dateCreated: new Date(dateCreated),
1772
1772
  dateUpdated: new Date(dateUpdated),
1773
1773
  identity: responseIdentity,
@@ -7170,7 +7170,7 @@ function PushNotification(data) {
7170
7170
  this.data = data.data || {};
7171
7171
  });
7172
7172
 
7173
- var version = "3.0.0-rc.7";
7173
+ var version = "3.0.0-rc.8";
7174
7174
 
7175
7175
  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; }
7176
7176
 
@@ -7759,14 +7759,16 @@ exports.Client = Client_1 = (_class = /*#__PURE__*/function (_ReplayEventEmitter
7759
7759
  });
7760
7760
  };
7761
7761
 
7762
- _this._services.twilsockClient.onceWithReplay("connectionError", emitFailed);
7763
-
7764
- _this._services.twilsockClient.onceWithReplay("disconnected", function () {
7765
- return emitFailed({
7762
+ var emitDisconnected = function emitDisconnected() {
7763
+ emitFailed({
7766
7764
  terminal: true,
7767
7765
  message: "Twilsock has disconnected."
7768
7766
  });
7769
- });
7767
+ };
7768
+
7769
+ _this._services.twilsockClient.onceWithReplay("connectionError", emitFailed);
7770
+
7771
+ _this._services.twilsockClient.onceWithReplay("disconnected", emitDisconnected);
7770
7772
 
7771
7773
  _this._services.twilsockClient.onceWithReplay("connected", /*#__PURE__*/_asyncToGenerator__default["default"]( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee() {
7772
7774
  var startupEvent, connectionError;
@@ -7778,7 +7780,7 @@ exports.Client = Client_1 = (_class = /*#__PURE__*/function (_ReplayEventEmitter
7778
7780
 
7779
7781
  _this._services.twilsockClient.off("connectionError", emitFailed);
7780
7782
 
7781
- _this._services.twilsockClient.off("disconnected", emitFailed);
7783
+ _this._services.twilsockClient.off("disconnected", emitDisconnected);
7782
7784
 
7783
7785
  _context.prev = 3;
7784
7786
  startupEvent = "conversations.client.startup";