@ethora/chat-component 24.12.38 → 24.12.40
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/dist/main.js +4 -7
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -16710,13 +16710,12 @@ const Nc = ["#f44336", "#2196f3", "#4caf50", "#ff9800"], aA = ({
|
|
|
16710
16710
|
let S = new FormData();
|
|
16711
16711
|
S.append("files", l);
|
|
16712
16712
|
const M = await vi(S), I = (R = (N = (O = M == null ? void 0 : M.data) == null ? void 0 : O.results) == null ? void 0 : N[0]) == null ? void 0 : R.location;
|
|
16713
|
-
|
|
16714
|
-
throw new Error("No location found in upload result.");
|
|
16713
|
+
I || console.log("No location found in upload result.");
|
|
16715
16714
|
const j = await A.createRoomStanza(
|
|
16716
16715
|
s,
|
|
16717
16716
|
i
|
|
16718
16717
|
);
|
|
16719
|
-
A.
|
|
16718
|
+
A.getRoomsStanza(), e(rt({ roomJID: j })), I && (A.setRoomImageStanza(j, I, "icon", "none"), e(JA({ jid: j, updates: { icon: I } }))), n(!1), h({ name: "", description: "" }), o(""), a("");
|
|
16720
16719
|
}
|
|
16721
16720
|
};
|
|
16722
16721
|
return /* @__PURE__ */ D(pe, { children: [
|
|
@@ -18455,11 +18454,9 @@ const Ph = x.div`
|
|
|
18455
18454
|
let w = new FormData();
|
|
18456
18455
|
w.append("files", h);
|
|
18457
18456
|
const C = await vi(w), E = (g = (f = (p = C == null ? void 0 : C.data) == null ? void 0 : p.results) == null ? void 0 : f[0]) == null ? void 0 : g.location;
|
|
18458
|
-
|
|
18459
|
-
throw new Error("No location found in upload result.");
|
|
18460
|
-
o.setRoomImageStanza(i.jid, E, "icon", "none"), s(
|
|
18457
|
+
E || console.log("No location found in upload result."), E && (o.setRoomImageStanza(i.jid, E, "icon", "none"), s(
|
|
18461
18458
|
JA({ jid: i.jid, updates: { icon: E } })
|
|
18462
|
-
);
|
|
18459
|
+
));
|
|
18463
18460
|
} catch (w) {
|
|
18464
18461
|
console.error("File upload failed or location is missing:", w);
|
|
18465
18462
|
}
|