@paramms/chat-widget 1.0.36 → 1.0.37
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 +9 -1
- package/dist/chatlist.js +110 -70
- package/dist/chatlist.js.map +1 -1
- package/dist/codec.js +1135 -0
- package/dist/codec.js.map +1 -0
- package/dist/core.js +14 -14
- package/dist/core.js.map +1 -1
- package/dist/embed.js +1 -1
- package/dist/embed.js.map +1 -1
- package/dist/hooks.js +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/dist/outbox.js +170 -1210
- package/dist/outbox.js.map +1 -1
- package/dist/protocol/frames.d.ts +5 -0
- package/dist/react.d.ts +9 -2
- package/dist/react.js +287 -249
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
- package/dist/uid.js +0 -91
- package/dist/uid.js.map +0 -1
package/dist/hooks.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState as d, useEffect as R, useRef as $, useSyncExternalStore as w, useMemo as h } from "react";
|
|
2
2
|
import { RelayClient as C } from "./core.js";
|
|
3
|
-
import { r as b, p as U } from "./
|
|
3
|
+
import { r as b, p as U } from "./codec.js";
|
|
4
4
|
function T(e) {
|
|
5
5
|
var c;
|
|
6
6
|
const l = `${e.url}|${e.token ?? ""}|${e.profileId}|${e.subjectId ?? ""}|${e.kind ?? ""}|${e.peerId ?? ""}`, o = $(null);
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var pe = Object.defineProperty;
|
|
2
2
|
var he = (o, e, i) => e in o ? pe(o, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : o[e] = i;
|
|
3
3
|
var y = (o, e, i) => he(o, typeof e != "symbol" ? e + "" : e, i);
|
|
4
|
-
import { p as fe, r as ue, a as we } from "./
|
|
5
|
-
import { h as Me } from "./
|
|
4
|
+
import { p as fe, r as ue, a as we } from "./codec.js";
|
|
5
|
+
import { h as Me } from "./codec.js";
|
|
6
6
|
import { P as be, C as xe, b as ge } from "./outbox.js";
|
|
7
7
|
import { e as He } from "./outbox.js";
|
|
8
8
|
import { E2ESession as me, extractX3DHInit as ye } from "./e2e.js";
|
|
@@ -908,7 +908,12 @@ function Be(o) {
|
|
|
908
908
|
try {
|
|
909
909
|
const E = await fetch(p, {
|
|
910
910
|
method: "POST",
|
|
911
|
-
|
|
911
|
+
// Use the resolved connection token (a signed JWT, an explicit userId,
|
|
912
|
+
// or the anonymous persistent uid) — NOT just opts.token. The server
|
|
913
|
+
// requires an Authorization header, and the verifier accepts an
|
|
914
|
+
// anonymous id as a guest; keying off opts.token alone meant anonymous
|
|
915
|
+
// visitors (the common case) sent no auth and every upload 401'd.
|
|
916
|
+
headers: { "content-type": n.type, authorization: `Bearer ${a}` },
|
|
912
917
|
body: n
|
|
913
918
|
});
|
|
914
919
|
if (!E.ok) throw new Error(`Upload failed: ${E.status}`);
|