@ethora/chat-component 25.5.28 → 25.5.29

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
@@ -8866,27 +8866,29 @@ const bw = (n) => [...vw(n)].filter(
8866
8866
  e,
8867
8867
  z.getState().chatSettingStore.user.token
8868
8868
  ), Mc = async (n) => {
8869
- if (!n?.getChild("result") && !n.getChild("composing") && !n.getChild("paused") && !n.getChild("subject") && !n.is("iq") && n?.attrs?.id !== "deleteMessageStanza" && !n?.attrs?.id?.includes("message-reaction")) {
8870
- const { data: e, id: i, body: t, ...r } = await FA(n);
8871
- if (!e) {
8869
+ if (!n.getChildren("x").find(
8870
+ (i) => i.attrs.xmlns === "http://jabber.org/protocol/muc#user" && i.getChild("invite")
8871
+ ) && !n?.getChild("result") && !n.getChild("composing") && !n.getChild("paused") && !n.getChild("subject") && !n.is("iq") && n?.attrs?.id !== "deleteMessageStanza" && !n?.attrs?.id?.includes("message-reaction")) {
8872
+ const { data: i, id: t, body: r, ...s } = await FA(n);
8873
+ if (!i) {
8872
8874
  console.log("No data in stanza");
8873
8875
  return;
8874
8876
  }
8875
- const s = await LA({
8876
- data: e,
8877
- id: i,
8878
- body: t,
8879
- ...r
8880
- }), a = await sh(
8877
+ const a = await LA({
8878
+ data: i,
8879
+ id: t,
8880
+ body: r,
8881
+ ...s
8882
+ }), A = await sh(
8881
8883
  z.getState().rooms.usersSet,
8882
- s.user.id
8884
+ a.user.id
8883
8885
  );
8884
- return a && z.dispatch(UA({ newUsers: [a] })), z.dispatch(
8886
+ return A && z.dispatch(UA({ newUsers: [A] })), z.dispatch(
8885
8887
  zr({
8886
8888
  roomJID: n.attrs.from.split("/")[0],
8887
- message: s
8889
+ message: a
8888
8890
  })
8889
- ), s;
8891
+ ), a;
8890
8892
  }
8891
8893
  }, Rc = async (n) => {
8892
8894
  if (n?.attrs?.id?.includes("message-reaction")) {
@@ -12760,23 +12762,11 @@ const M3 = T.div`
12760
12762
  }
12761
12763
  }, [o, v]), fe(() => {
12762
12764
  const M = t?.botMessageAutoScroll, Q = y.current;
12763
- !M || !Q || (Q.scrollHeight - Q.clientHeight - Q.scrollTop < 100, console.log(g.length), console.log({
12764
- scrollHeight: Q.scrollHeight,
12765
- clientHeight: Q.clientHeight,
12766
- scrollTOp: Q.scrollTop
12767
- }), O().then(() => {
12765
+ !M || !Q || O().then(() => {
12768
12766
  setTimeout(() => {
12769
- console.log("Before scroll:", {
12770
- scrollTop: Q.scrollTop,
12771
- scrollHeight: Q.scrollHeight,
12772
- clientHeight: Q.clientHeight
12773
- }), te(), l(!1), console.log("After scroll:", {
12774
- scrollTop: Q.scrollTop,
12775
- scrollHeight: Q.scrollHeight,
12776
- clientHeight: Q.clientHeight
12777
- });
12767
+ te(), l(!1);
12778
12768
  }, 50);
12779
- }));
12769
+ });
12780
12770
  }, [g.length, t?.botMessageAutoScroll]);
12781
12771
  let P = null;
12782
12772
  return /* @__PURE__ */ S(w3, { ref: I, children: [