@antzsoft/chat-core 1.3.6 → 1.3.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/README.md +32 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/{storage-DJh54pps.d.cts → storage-BJvQhWxC.d.cts} +8 -0
- package/dist/{storage-DJh54pps.d.ts → storage-BJvQhWxC.d.ts} +8 -0
- package/docs/integration-guide.html +107 -3
- package/package.json +1 -1
|
@@ -155,7 +155,7 @@ section.sec>h2:hover{color:#fff}
|
|
|
155
155
|
|
|
156
156
|
<div class="section-label">What's New</div>
|
|
157
157
|
<ul>
|
|
158
|
-
<li><a href="#whats-new">v1.3.
|
|
158
|
+
<li><a href="#whats-new">v1.3.8 Release Notes</a></li>
|
|
159
159
|
</ul>
|
|
160
160
|
|
|
161
161
|
<div class="section-label">Getting Started</div>
|
|
@@ -250,12 +250,116 @@ section.sec>h2:hover{color:#fff}
|
|
|
250
250
|
<h2>What's New</h2>
|
|
251
251
|
<p style="color:var(--muted);font-size:13px;margin-bottom:20px">Version history and release notes. Click a version to expand.</p>
|
|
252
252
|
|
|
253
|
-
<!-- ── v1.3.
|
|
253
|
+
<!-- ── v1.3.8 (current) ── -->
|
|
254
|
+
<div class="wn-version open" id="wn-138">
|
|
255
|
+
<div class="wn-header" onclick="toggleVersion('wn-138')">
|
|
256
|
+
<div class="wn-title">
|
|
257
|
+
<span class="wn-ver">v1.3.8</span>
|
|
258
|
+
<span class="wn-badge current">Current</span>
|
|
259
|
+
<span class="wn-date">July 2026</span>
|
|
260
|
+
</div>
|
|
261
|
+
<span class="wn-chevron">▲</span>
|
|
262
|
+
</div>
|
|
263
|
+
<div class="wn-body">
|
|
264
|
+
<div class="wn-item" id="wn-138-externalid">
|
|
265
|
+
<div class="wn-item-header" onclick="toggleItem('wn-138-externalid')">
|
|
266
|
+
<span class="wn-tag new">New</span>
|
|
267
|
+
<span class="wn-item-title">externalId now included on every embedded user, not just the standalone profile</span>
|
|
268
|
+
<span class="wn-chevron-sm">▾</span>
|
|
269
|
+
</div>
|
|
270
|
+
<div class="wn-item-body">
|
|
271
|
+
<p>Previously <code>externalId</code> (a user's ID in your external system, non-builtin modes) was only present on the <code>User</code> returned by <code>usersApi.list/getById/updateProfile</code>. Every <em>denormalized</em> place a user appeared dropped it, forcing a separate <code>usersApi.getById()</code> call to map a chat user back to your own system. These shapes now carry it:</p>
|
|
272
|
+
<ul>
|
|
273
|
+
<li><code>Participant</code> — new top-level <code>externalId?</code>, also mirrored on <code>Participant.user.externalId</code> (conversations API + conversation socket events).</li>
|
|
274
|
+
<li><code>Message.sender</code> — the server now populates <code>externalId</code> on the sender embed.</li>
|
|
275
|
+
<li><code>ReactionUser</code> (<code>messagesApi.getReactions</code>) — new <code>externalId?</code>.</li>
|
|
276
|
+
<li><code>MessageReceiptEntry</code> (<code>messagesApi.getReceipts</code>) — new <code>externalId?</code>.</li>
|
|
277
|
+
<li><code>TypingIndicatorEvent</code> (socket) — new <code>externalId?</code>. Present in non-builtin modes; <strong>absent in builtin mode</strong>, where no external identity exists.</li>
|
|
278
|
+
</ul>
|
|
279
|
+
<p><strong>Backward compatible, additive-only.</strong> Every field is optional. An older SDK against this server ignores the extra field; this SDK against an older server sees <code>externalId</code> as <code>undefined</code>. Note <code>externalId</code> (string, the chat user's external identity) is distinct from the pre-existing <code>Participant.externalUserId</code> (number) — both are sent; do not confuse them. Requires a server with this change to be populated; safe to upgrade regardless. <strong>No integration changes required</strong> — read <code>externalId</code> where you previously had to look it up separately.</p>
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
282
|
+
</div>
|
|
283
|
+
</div><!-- /.wn-version -->
|
|
284
|
+
|
|
285
|
+
<!-- ── v1.3.7 ── -->
|
|
286
|
+
<div class="wn-version open" id="wn-137">
|
|
287
|
+
<div class="wn-header" onclick="toggleVersion('wn-137')">
|
|
288
|
+
<div class="wn-title">
|
|
289
|
+
<span class="wn-ver">v1.3.7</span>
|
|
290
|
+
<span class="wn-date">July 2026</span>
|
|
291
|
+
</div>
|
|
292
|
+
<span class="wn-chevron">▲</span>
|
|
293
|
+
</div>
|
|
294
|
+
<div class="wn-body">
|
|
295
|
+
<div class="wn-item" id="wn-137-docs">
|
|
296
|
+
<div class="wn-item-header" onclick="toggleItem('wn-137-docs')">
|
|
297
|
+
<span class="wn-tag fix">Docs</span>
|
|
298
|
+
<span class="wn-item-title">Documentation brought up to date (no code changes)</span>
|
|
299
|
+
<span class="wn-chevron-sm">▾</span>
|
|
300
|
+
</div>
|
|
301
|
+
<div class="wn-item-body">
|
|
302
|
+
<p>This "What's New" section had stopped at v1.3.4. It now includes the v1.3.5 and v1.3.6 reconnect/transit fixes below, and this v1.3.7 entry. <strong>No SDK behaviour changed in 1.3.7</strong> — upgrading from 1.3.6 is a runtime no-op.</p>
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
</div>
|
|
306
|
+
</div><!-- /.wn-version -->
|
|
307
|
+
|
|
308
|
+
<!-- ── v1.3.6 ── -->
|
|
309
|
+
<div class="wn-version open" id="wn-136">
|
|
310
|
+
<div class="wn-header" onclick="toggleVersion('wn-136')">
|
|
311
|
+
<div class="wn-title">
|
|
312
|
+
<span class="wn-ver">v1.3.6</span>
|
|
313
|
+
<span class="wn-date">July 2026</span>
|
|
314
|
+
</div>
|
|
315
|
+
<span class="wn-chevron">▲</span>
|
|
316
|
+
</div>
|
|
317
|
+
<div class="wn-body">
|
|
318
|
+
<div class="wn-item" id="wn-136-transit-preserve">
|
|
319
|
+
<div class="wn-item-header" onclick="toggleItem('wn-136-transit-preserve')">
|
|
320
|
+
<span class="wn-tag fix">Fix</span>
|
|
321
|
+
<span class="wn-item-title"><code>reconnectSocket</code> preserves the transit session instead of recreating it</span>
|
|
322
|
+
<span class="wn-chevron-sm">▾</span>
|
|
323
|
+
</div>
|
|
324
|
+
<div class="wn-item-body">
|
|
325
|
+
<p>Follow-up to the v1.3.5 reconnect fix. v1.3.5 fixed <code>"Transit encryption required"</code> by disconnecting and re-running the full <code>connectSocket()</code> handshake — but that also cleared the cached transit session (the <code>'disconnect'</code> handler calls <code>clearTransitSession()</code>) and established a brand-new one with a new session key. Server-broadcast events (e.g. <code>user_online</code>) are encrypted with the session the server still holds, so a fresh client key could not decrypt them, producing continuous <code>"Transit decryption failed for event: user_online"</code>.</p>
|
|
326
|
+
<p><code>reconnectSocket</code> is a token-only refresh — the transit session is still valid on the server (stored in Redis by <code>sessionId</code>, re-linked to the new socket on reconnect). It now carries the existing <code>transitSessionId</code> forward in the handshake auth and reconnects the <strong>same</strong> socket <strong>without</strong> disconnecting, keeping the client's session key intact. The server re-links the same session, so both sides keep the same key and decryption keeps working. Falls back to the full <code>connectSocket()</code> flow only when there is no valid cached session to preserve (e.g. the socket was already disconnected).</p>
|
|
327
|
+
<p><strong>No integration changes required.</strong> Keeps v1.3.5's "no more <code>Transit encryption required</code> on reconnect" while removing the <code>user_online</code> decryption-failure regression.</p>
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
</div><!-- /.wn-version -->
|
|
332
|
+
|
|
333
|
+
<!-- ── v1.3.5 ── -->
|
|
334
|
+
<div class="wn-version open" id="wn-135">
|
|
335
|
+
<div class="wn-header" onclick="toggleVersion('wn-135')">
|
|
336
|
+
<div class="wn-title">
|
|
337
|
+
<span class="wn-ver">v1.3.5</span>
|
|
338
|
+
<span class="wn-date">July 2026</span>
|
|
339
|
+
</div>
|
|
340
|
+
<span class="wn-chevron">▲</span>
|
|
341
|
+
</div>
|
|
342
|
+
<div class="wn-body">
|
|
343
|
+
<div class="wn-item" id="wn-135-transit-reconnect">
|
|
344
|
+
<div class="wn-item-header" onclick="toggleItem('wn-135-transit-reconnect')">
|
|
345
|
+
<span class="wn-tag fix">Fix</span>
|
|
346
|
+
<span class="wn-item-title"><code>reconnectSocket</code> no longer drops the transit-encryption handshake</span>
|
|
347
|
+
<span class="wn-chevron-sm">▾</span>
|
|
348
|
+
</div>
|
|
349
|
+
<div class="wn-item-body">
|
|
350
|
+
<p><code>reconnectSocket</code> predates transit encryption and was never migrated: it overwrote <code>_socket.auth</code> with only <code>{ token, userId, tenantId }</code>, dropping the <code>transitSessionId</code> / <code>transitEphemeralPub</code> fields that <code>connectSocket()</code> sets during the handshake. Combined with the <code>'disconnect'</code> handler clearing the cached transit session, a reconnect after the socket had disconnected (e.g. app returning to foreground on iOS/Android, where backgrounding fully disconnects) went out with no transit auth and no cached session, so the server rejected the handshake with <code>"Transit encryption required: missing transitEphemeralPub/transitAlgo in handshake auth"</code>. Intermittent — fast devices whose cached transit session survived the reconnect were unaffected.</p>
|
|
351
|
+
<p>When transit encryption is on, <code>reconnectSocket</code> now delegates to the full <code>connectSocket()</code> flow (re-establishes/reuses the transit session, rebuilds the handshake auth) instead of a bare auth-swap. It also inherits <code>connectSocket()</code>'s in-flight dedupe, so multiple rapid reconnect calls collapse into one. Non-transit deployments keep the original fast bare auth-swap path unchanged.</p>
|
|
352
|
+
<p><strong>Note:</strong> v1.3.5 introduced a follow-on regression (see v1.3.6) — prefer <strong>1.3.6+</strong>. <strong>No integration changes required</strong> — same <code>reconnectSocket(token, userId, tenantId)</code> signature.</p>
|
|
353
|
+
</div>
|
|
354
|
+
</div>
|
|
355
|
+
</div>
|
|
356
|
+
</div><!-- /.wn-version -->
|
|
357
|
+
|
|
358
|
+
<!-- ── v1.3.4 ── -->
|
|
254
359
|
<div class="wn-version open" id="wn-134">
|
|
255
360
|
<div class="wn-header" onclick="toggleVersion('wn-134')">
|
|
256
361
|
<div class="wn-title">
|
|
257
362
|
<span class="wn-ver">v1.3.4</span>
|
|
258
|
-
<span class="wn-badge current">Current</span>
|
|
259
363
|
<span class="wn-date">July 2026</span>
|
|
260
364
|
</div>
|
|
261
365
|
<span class="wn-chevron">▲</span>
|
package/package.json
CHANGED