@ethora/chat-component 25.4.10 → 25.4.11

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
@@ -70020,26 +70020,20 @@ async function kB(n, e, i, t, r = 10, s = 7500) {
70020
70020
  let a = 0, o = [];
70021
70021
  for (; a <= r; ) {
70022
70022
  try {
70023
- if (console.log(`Attempt ${a + 1} to get rooms...`), o = await i(n, e), t && Array.isArray(o)) {
70023
+ if (o = await i(n, e), t && Array.isArray(o)) {
70024
70024
  if (rA(
70025
70025
  t,
70026
70026
  o
70027
70027
  ))
70028
- return console.log("Selected room is present in the fetched rooms."), o;
70029
- console.log(
70030
- "Selected room is not present in the fetched rooms. Retrying..."
70031
- );
70028
+ return o;
70032
70029
  } else if (Array.isArray(o) && o.length > 0)
70033
- return console.log("Successfully fetched rooms:", o), o;
70034
- console.log(
70035
- `Attempt ${a + 1} returned an empty array. Retrying in ${s / 1e3} seconds...`
70036
- );
70030
+ return o;
70037
70031
  } catch (A) {
70038
70032
  console.error(`Error during attempt ${a + 1}:`, A);
70039
70033
  }
70040
70034
  a++, a <= r && await CB(s);
70041
70035
  }
70042
- return console.log(`Failed to get rooms after ${r + 1} attempts.`), null;
70036
+ return null;
70043
70037
  }
70044
70038
  function CB(n) {
70045
70039
  return new Promise((e) => setTimeout(e, n));
@@ -70082,7 +70076,7 @@ const xB = ({
70082
70076
  else if (yB({ roomJID: n, wasAutoSelected: e, config: i, dispatch: t }), d) {
70083
70077
  if (i != null && i.newArch) {
70084
70078
  const B = await C(d, !0);
70085
- console.log(B, "loadedRooms"), i != null && i.enableRoomsRetry.enabled && (B != null && B.length) && (rA(
70079
+ i != null && i.enableRoomsRetry.enabled && (B != null && B.length) && (rA(
70086
70080
  n,
70087
70081
  B
70088
70082
  ) || await w());
@@ -70104,7 +70098,7 @@ const xB = ({
70104
70098
  s(!0), await k1(B, v);
70105
70099
  else if (i != null && i.newArch) {
70106
70100
  const M = await C(B);
70107
- console.log(M, "loadedRooms"), i != null && i.enableRoomsRetry.enabled && (rA(
70101
+ i != null && i.enableRoomsRetry.enabled && (rA(
70108
70102
  n,
70109
70103
  M
70110
70104
  ) || await w()), s(!0);