@ethora/chat-component 24.11.11 → 24.11.12

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
@@ -15865,7 +15865,7 @@ const Xc = ["#f44336", "#2196f3", "#4caf50", "#ff9800"], V4 = k.div`
15865
15865
  V4,
15866
15866
  {
15867
15867
  bgColor: r,
15868
- color: ((o) => ["#4caf50", "#ff9800"].includes(o) ? "#000" : "#fff")(r),
15868
+ color: ((o) => (["#4caf50", "#ff9800"].includes(o), "#fff"))(r),
15869
15869
  size: e,
15870
15870
  children: n()
15871
15871
  }
@@ -16273,11 +16273,15 @@ const Xc = ["#f44336", "#2196f3", "#4caf50", "#ff9800"], V4 = k.div`
16273
16273
  );
16274
16274
  ve(() => {
16275
16275
  if (l != null && l.setRoomJidInPath && c) {
16276
- const A = c.split("@")[0], S = `${window.location.origin}/${A}`;
16277
- window.history.pushState(null, "", S);
16276
+ const A = c.split("@")[0], D = `${window.location.pathname.split("/").slice(0, -1).join("/")}/${A}`;
16277
+ window.history.pushState(null, "", D);
16278
16278
  }
16279
16279
  return () => {
16280
- window.history.pushState(null, "", window.location.origin);
16280
+ window.history.pushState(
16281
+ null,
16282
+ "",
16283
+ window.location.pathname.split("/").slice(0, -1).join("/")
16284
+ );
16281
16285
  };
16282
16286
  }, [c]);
16283
16287
  const f = W(
@@ -16361,7 +16365,7 @@ const Xc = ["#f44336", "#2196f3", "#4caf50", "#ff9800"], V4 = k.div`
16361
16365
  });
16362
16366
  };
16363
16367
  n(nt({ loading: !0, chatJID: c })), ((D = Object.keys(o)) == null ? void 0 : D.length) > 0 && (!(o != null && o[c]) && Object.keys(o).length > 0 ? S() : d.length < 1 ? A() : n(nt({ loading: !1, chatJID: c })));
16364
- }, [c, Object.keys(o).length]), !c || ((m = Object.keys(o)) == null ? void 0 : m.length) < 1 || !(o != null && o[c]) ? (console.log({ activeRoomJID: c, roomsList: o }), /* @__PURE__ */ g(
16368
+ }, [c, Object.keys(o).length]), !c || ((m = Object.keys(o)) == null ? void 0 : m.length) < 1 || !(o != null && o[c]) ? /* @__PURE__ */ g(
16365
16369
  "div",
16366
16370
  {
16367
16371
  style: {
@@ -16372,7 +16376,7 @@ const Xc = ["#f44336", "#2196f3", "#4caf50", "#ff9800"], V4 = k.div`
16372
16376
  },
16373
16377
  children: /* @__PURE__ */ g(Sn, { color: (C = l == null ? void 0 : l.colors) == null ? void 0 : C.primary })
16374
16378
  }
16375
- )) : /* @__PURE__ */ P(
16379
+ ) : /* @__PURE__ */ P(
16376
16380
  Av,
16377
16381
  {
16378
16382
  style: {
@@ -18335,9 +18339,7 @@ const Nx = ({ src: t }) => {
18335
18339
  s && u(Ar({ roomJID: s })), u(qg(r)), u(nt({ loading: !0 })), (async () => {
18336
18340
  var b;
18337
18341
  try {
18338
- !l.defaultWallet || (l == null ? void 0 : l.defaultWallet.walletAddress) === "" ? (c(!0), console.log("Error, no user")) : y ? (y.getRooms().finally(() => {
18339
- i(!0);
18340
- }), Vo()) : (c(!1), console.log("No client, so initing one"), await v(
18342
+ !l.defaultWallet || (l == null ? void 0 : l.defaultWallet.walletAddress) === "" ? (c(!0), console.log("Error, no user")) : y ? (p || y.getRooms(), i(!0), Vo()) : (c(!1), console.log("No client, so initing one"), await v(
18341
18343
  (b = l.defaultWallet) == null ? void 0 : b.walletAddress,
18342
18344
  l.xmppPassword
18343
18345
  ).then((x) => {