@talkjs/core 1.6.0 → 1.6.2
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 +14 -1
- package/dist/talkSession.cjs +1 -1
- package/dist/talkSession.d.ts +3 -3
- package/dist/talkSession.js +535 -469
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -69,10 +69,23 @@ If you encounter any problems with `@talkjs/core`, please open a [chat with supp
|
|
|
69
69
|
|
|
70
70
|
## Changelog
|
|
71
71
|
|
|
72
|
+
### 1.6.2
|
|
73
|
+
|
|
74
|
+
- Made `locale` in `SetUserParams` nullable. Setting locale to `null` means the user will fall-back to the default locale set on the dashboard.
|
|
75
|
+
- Improved performance when repeatedly calling `ConversationRef.get()`.
|
|
76
|
+
|
|
77
|
+
### 1.6.1
|
|
78
|
+
|
|
79
|
+
- Fixed a bug where two authentication methods could be active at the same time, causing race conditions.
|
|
80
|
+
- Prevented switching to JWT authentication once connected to TalkJS servers. Your initial `setToken` or `onNeedToken` configuration must happen before the first requests / before mounting any UI components.
|
|
81
|
+
- Optimised initial WebSocket connection to happen in parallel with fetching token, to improve startup speed.
|
|
82
|
+
|
|
83
|
+
To use JWTs, call `setToken` or set `onNeedToken` before triggering any requests or mounting any components. We recommend setting up authentication in your app's entry point (App.jsx, main.js, or similar) so it runs first.
|
|
84
|
+
|
|
72
85
|
### 1.6.0
|
|
73
86
|
|
|
74
87
|
- Added `TalkSession.setToken(token: string)` which reauthenticates the session with a new token.
|
|
75
|
-
- Added `TalkSession.onNeedToken: () => void` which gets called whenever a new auth token is needed. To use refreshable auth tokens, set a callback that fetches a new auth token and
|
|
88
|
+
- Added `TalkSession.onNeedToken: () => void` which gets called whenever a new auth token is needed. To use refreshable auth tokens, set a callback that fetches a new auth token and passes it to `setToken`.
|
|
76
89
|
- Deprecated `token` and `tokenFetcher` options in `getTalkSession` in favour of those two properties.
|
|
77
90
|
- Removed some duplicate logging on auth-related errors.
|
|
78
91
|
- Sessions no longer get garbage collected under any circumstances (to enable persistence of `.setToken`).
|