@ethora/chat-component 25.4.12 → 25.5.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.
@@ -125,3 +125,11 @@ export declare const DoubleTick: ({ fill, color, ...props }: {
125
125
  fill?: string;
126
126
  color?: string;
127
127
  }) => import("react/jsx-runtime").JSX.Element;
128
+ export declare const RedCross: ({ color, ...props }: {
129
+ [x: string]: any;
130
+ color?: string;
131
+ }) => import("react/jsx-runtime").JSX.Element;
132
+ export declare const SingleTick: ({ color, ...props }: {
133
+ [x: string]: any;
134
+ color?: string;
135
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare function findError(node: Element): {
2
+ hasError: boolean;
3
+ errorText: string | null;
4
+ };
@@ -1,3 +1,5 @@
1
- import { ApiRoom } from '../types/types';
1
+ import { ApiRoom, IRoom } from '../types/types';
2
2
 
3
- export declare function isChatIdPresentInArray(chatIdToFind: string, chatList: ApiRoom[]): boolean;
3
+ export declare function isChatIdPresentInArray(chatIdToFind: string, chatList: ApiRoom[] | {
4
+ [jid: string]: IRoom;
5
+ }): boolean;
package/dist/main.js CHANGED
@@ -8586,7 +8586,7 @@ Ee.interceptors.response.use(
8586
8586
  var e, i, t, r, s, a, o, A, f;
8587
8587
  if (!((t = (i = (e = _.getState().chatSettingStore) == null ? void 0 : e.config) == null ? void 0 : i.refreshTokens) != null && t.enabled))
8588
8588
  if ((a = (s = (r = _.getState().chatSettingStore) == null ? void 0 : r.config) == null ? void 0 : s.refreshTokens) != null && a.refreshFunction) {
8589
- const { refreshToken: d, accessToken: c } = (f = (A = (o = _.getState().chatSettingStore) == null ? void 0 : o.config) == null ? void 0 : A.refreshTokens) == null ? void 0 : f.refreshFunction();
8589
+ const { refreshToken: d, accessToken: c } = await ((f = (A = (o = _.getState().chatSettingStore) == null ? void 0 : o.config) == null ? void 0 : A.refreshTokens) == null ? void 0 : f.refreshFunction());
8590
8590
  _.dispatch(
8591
8591
  Tu({
8592
8592
  token: c,
@@ -12408,12 +12408,7 @@ const i4 = N.div`
12408
12408
  xmlns: "http://www.w3.org/2000/svg",
12409
12409
  ...i,
12410
12410
  children: [
12411
- /* @__PURE__ */ u(
12412
- "path",
12413
- {
12414
- d: "M0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z"
12415
- }
12416
- ),
12411
+ /* @__PURE__ */ u("path", { d: "M0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z" }),
12417
12412
  /* @__PURE__ */ u(
12418
12413
  "path",
12419
12414
  {
@@ -70007,13 +70002,24 @@ const ME = N.div`
70007
70002
  }
70008
70003
  };
70009
70004
  function sA(n, e) {
70010
- if (!e || e.length === 0)
70005
+ if (!e)
70006
+ return !1;
70007
+ if (Array.isArray(e)) {
70008
+ if (e.length === 0)
70009
+ return !1;
70010
+ } else if (Object.keys(e).length === 0)
70011
70011
  return !1;
70012
70012
  const i = n.split("@")[0].trim();
70013
- console.log("trimmedId", i);
70014
- for (const t of e)
70015
- if (console.log("check", i === t.name), t && typeof t.name == "string" && t.name === i)
70016
- return !0;
70013
+ if (Array.isArray(e)) {
70014
+ for (const t of e)
70015
+ if (console.log("check", i === t.name), t && typeof t.name == "string" && t.name === i)
70016
+ return !0;
70017
+ } else
70018
+ for (const t in e) {
70019
+ const r = e[t];
70020
+ if (r && typeof r.name == "string" && r.name === i)
70021
+ return !0;
70022
+ }
70017
70023
  return !1;
70018
70024
  }
70019
70025
  async function kB(n, e, i, t, r = 10, s = 7500) {
@@ -70073,20 +70079,16 @@ const xB = ({
70073
70079
  try {
70074
70080
  if (!m.xmppUsername)
70075
70081
  o(!0), console.log("Error, no user");
70076
- else if (yB({ roomJID: n, wasAutoSelected: e, config: i, dispatch: t }), d) {
70077
- if (i != null && i.newArch) {
70078
- const D = await C(d, !0);
70079
- (B = i == null ? void 0 : i.enableRoomsRetry) != null && B.enabled && (D != null && D.length) && (sA(
70080
- n,
70081
- D
70082
- ) || await w());
70083
- }
70084
- s(!0), await d.getChatsPrivateStoreRequestStanza().then(
70082
+ else if (yB({ roomJID: n, wasAutoSelected: e, config: i, dispatch: t }), d)
70083
+ i != null && i.newArch && (B = i == null ? void 0 : i.enableRoomsRetry) != null && B.enabled && (sA(
70084
+ n,
70085
+ v
70086
+ ) || await w()), s(!0), await d.getChatsPrivateStoreRequestStanza().then(
70085
70087
  async (D) => {
70086
70088
  _r(D, t), await $r(g, d), l(d);
70087
70089
  }
70088
70090
  ), (M = i == null ? void 0 : i.refreshTokens) != null && M.enabled && Do();
70089
- } else {
70091
+ else {
70090
70092
  s(!1), o(!1), console.log("No client, so initing one");
70091
70093
  const D = await c(
70092
70094
  m.xmppUsername || ((S = m == null ? void 0 : m.defaultWallet) == null ? void 0 : S.walletAddress),