@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 +18 -28
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
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
|
|
8870
|
-
|
|
8871
|
-
|
|
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
|
|
8876
|
-
data:
|
|
8877
|
-
id:
|
|
8878
|
-
body:
|
|
8879
|
-
...
|
|
8880
|
-
}),
|
|
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
|
-
|
|
8884
|
+
a.user.id
|
|
8883
8885
|
);
|
|
8884
|
-
return
|
|
8886
|
+
return A && z.dispatch(UA({ newUsers: [A] })), z.dispatch(
|
|
8885
8887
|
zr({
|
|
8886
8888
|
roomJID: n.attrs.from.split("/")[0],
|
|
8887
|
-
message:
|
|
8889
|
+
message: a
|
|
8888
8890
|
})
|
|
8889
|
-
),
|
|
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 || (
|
|
12764
|
-
scrollHeight: Q.scrollHeight,
|
|
12765
|
-
clientHeight: Q.clientHeight,
|
|
12766
|
-
scrollTOp: Q.scrollTop
|
|
12767
|
-
}), O().then(() => {
|
|
12765
|
+
!M || !Q || O().then(() => {
|
|
12768
12766
|
setTimeout(() => {
|
|
12769
|
-
|
|
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: [
|