@ethora/chat-component 24.12.39 → 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 CHANGED
@@ -16715,7 +16715,7 @@ const Nc = ["#f44336", "#2196f3", "#4caf50", "#ff9800"], aA = ({
16715
16715
  s,
16716
16716
  i
16717
16717
  );
16718
- A.setRoomImageStanza(j, I, "icon", "none"), A.getRoomsStanza(), e(rt({ roomJID: j })), e(JA({ jid: j, updates: { icon: I } })), n(!1), h({ name: "", description: "" }), o(""), 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("");
16719
16719
  }
16720
16720
  };
16721
16721
  return /* @__PURE__ */ D(pe, { children: [
@@ -18454,11 +18454,9 @@ const Ph = x.div`
18454
18454
  let w = new FormData();
18455
18455
  w.append("files", h);
18456
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;
18457
- if (!E)
18458
- throw new Error("No location found in upload result.");
18459
- 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(
18460
18458
  JA({ jid: i.jid, updates: { icon: E } })
18461
- );
18459
+ ));
18462
18460
  } catch (w) {
18463
18461
  console.error("File upload failed or location is missing:", w);
18464
18462
  }