@twilio/conversations 3.0.0-rc.6 → 3.0.0-rc.9
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 +24 -0
- package/README.md +2 -2
- package/builds/browser.js +10 -8
- package/builds/browser.js.map +1 -1
- package/builds/lib.d.ts +1 -1
- package/builds/lib.js +10 -8
- package/builds/lib.js.map +1 -1
- package/builds/twilio-conversations.js +13 -11
- package/builds/twilio-conversations.min.js +1 -1
- package/dist/client.js +8 -5
- package/dist/client.js.map +1 -1
- package/dist/data/participants.js +1 -1
- package/dist/data/participants.js.map +1 -1
- package/dist/packages/conversations/package.json.js +1 -1
- package/dist/push-notification.js.map +1 -1
- package/docs/index.html +3 -3
- package/docs/interfaces/PushNotificationData.html +1 -1
- package/docs/modules.html +2 -2
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,30 @@
|
|
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.9](https://github.com/twilio/rtd-sdk-monorepo-js/compare/@twilio/conversations@3.0.0-rc.8...@twilio/conversations@3.0.0-rc.9) (2022-05-19)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @twilio/conversations
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
## [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)
|
15
|
+
|
16
|
+
|
17
|
+
### Bug Fixes
|
18
|
+
|
19
|
+
* Fix convo 3.0 docs, and disconnecting client issue ([c65cf01](https://github.com/twilio/rtd-sdk-monorepo-js/commit/c65cf011406a80ca83da7ecba961aa31caf061bf))
|
20
|
+
* Fix double parsing participant attributes ([682ed94](https://github.com/twilio/rtd-sdk-monorepo-js/commit/682ed94c791a4b2bc9dac6aa987f9aae80201365))
|
21
|
+
|
22
|
+
|
23
|
+
### Reverts
|
24
|
+
|
25
|
+
* Revert "chore(release): Publish" ([097a200](https://github.com/twilio/rtd-sdk-monorepo-js/commit/097a2004f233688bf9a97d1defc976a9fb5da96d))
|
26
|
+
* Revert "chore(release): Publish" ([03b27ca](https://github.com/twilio/rtd-sdk-monorepo-js/commit/03b27ca9830bc6aba2d37febebe6e53f7abddb2d))
|
27
|
+
|
28
|
+
|
29
|
+
|
6
30
|
## [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
31
|
|
8
32
|
|
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
|
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:
|
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.
|
7173
|
+
var version = "3.0.0-rc.9";
|
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
|
-
|
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",
|
7783
|
+
_this._services.twilsockClient.off("disconnected", emitDisconnected);
|
7782
7784
|
|
7783
7785
|
_context.prev = 3;
|
7784
7786
|
startupEvent = "conversations.client.startup";
|