@ethora/chat-component 25.5.28 → 25.5.30
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 +32 -41
- 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: [
|
|
@@ -23737,31 +23727,32 @@ const ru = T.div`
|
|
|
23737
23727
|
}
|
|
23738
23728
|
return c < f.length && d.push(f.slice(c)), d;
|
|
23739
23729
|
}, o = (f) => {
|
|
23740
|
-
const d = [],
|
|
23741
|
-
let
|
|
23742
|
-
for (;
|
|
23743
|
-
const
|
|
23744
|
-
if (/^(\d+\.\s+|\-\s+)/.test(
|
|
23745
|
-
const
|
|
23746
|
-
d.push(/* @__PURE__ */ u("li", { children: A(
|
|
23730
|
+
const d = [], c = t[f].trim().match(/^(\d+)\./), h = !!c, m = c ? parseInt(c[1], 10) : 1;
|
|
23731
|
+
let p = f;
|
|
23732
|
+
for (; p < t.length; ) {
|
|
23733
|
+
const x = t[p];
|
|
23734
|
+
if (/^(\d+\.\s+|\-\s+)/.test(x)) {
|
|
23735
|
+
const C = x.replace(/^(\d+\.\s+|\-\s+)/, "");
|
|
23736
|
+
d.push(/* @__PURE__ */ u("li", { children: A(C) }, `li-${e++}`));
|
|
23747
23737
|
} else {
|
|
23748
|
-
if (
|
|
23738
|
+
if (x.trim() === "")
|
|
23749
23739
|
break;
|
|
23750
23740
|
break;
|
|
23751
23741
|
}
|
|
23752
|
-
|
|
23742
|
+
p++;
|
|
23753
23743
|
}
|
|
23754
|
-
const
|
|
23744
|
+
const b = h ? "ol" : "ul";
|
|
23755
23745
|
return {
|
|
23756
23746
|
list: Be.createElement(
|
|
23757
|
-
|
|
23747
|
+
b,
|
|
23758
23748
|
{
|
|
23759
23749
|
key: `list-${e++}`,
|
|
23760
|
-
style: { margin: "4px 0", paddingLeft: "20px" }
|
|
23750
|
+
style: { margin: "4px 0", paddingLeft: "20px" },
|
|
23751
|
+
...h ? { start: m } : {}
|
|
23761
23752
|
},
|
|
23762
23753
|
d
|
|
23763
23754
|
),
|
|
23764
|
-
newIndex:
|
|
23755
|
+
newIndex: p - 1
|
|
23765
23756
|
};
|
|
23766
23757
|
};
|
|
23767
23758
|
for (let f = 0; f < t.length; f++) {
|