@bcc-code/vue-bcc-chat-ui 7.1.38 → 7.1.39
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/vue-bcc-chat-ui.js +24 -15
- package/dist/vue-bcc-chat-ui.js.map +1 -1
- package/package.json +1 -1
package/dist/vue-bcc-chat-ui.js
CHANGED
|
@@ -4340,7 +4340,7 @@ function cc({ environment: e }) {
|
|
|
4340
4340
|
}
|
|
4341
4341
|
}
|
|
4342
4342
|
async function je(e) {
|
|
4343
|
-
T.value = e, E.value = null, b.value = [], de = null, C.value = !1, D.value = null, O.value = null, De(e), await it();
|
|
4343
|
+
console.log("select conversation", { conversationId: e }), T.value = e, E.value = null, b.value = [], de = null, C.value = !1, D.value = null, O.value = null, De(e), await it();
|
|
4344
4344
|
}
|
|
4345
4345
|
function Me(e) {
|
|
4346
4346
|
e && (O.value = null), D.value = e;
|
|
@@ -4971,7 +4971,7 @@ function cc({ environment: e }) {
|
|
|
4971
4971
|
return m.value ? [] : pc(await H.getMessageReceipts(String(e.id)));
|
|
4972
4972
|
}
|
|
4973
4973
|
function Ct() {
|
|
4974
|
-
r.value = !1, i.value = !1, a.value = !1, o.value = !1, s.value = !1, c.value = !1, l.value = !1, u.value = !1, d.value = !1, f.value = !1, p.value = !1, ye(), oe = 0, se = !1, V = !1, h.value = !1, _.value = null, v.value = [], y.value = [], b.value = [], x.value = [], E.value = null, D.value = null, O.value = null, k.value = [], T.value = null, S.value = !1, C.value = !1, ue = null, de = null, le.clear();
|
|
4974
|
+
console.log("Clearing chat state due to logout or connection issues."), r.value = !1, i.value = !1, a.value = !1, o.value = !1, s.value = !1, c.value = !1, l.value = !1, u.value = !1, d.value = !1, f.value = !1, p.value = !1, ye(), oe = 0, se = !1, V = !1, h.value = !1, _.value = null, v.value = [], y.value = [], b.value = [], x.value = [], E.value = null, D.value = null, O.value = null, k.value = [], T.value = null, S.value = !1, C.value = !1, ue = null, de = null, le.clear();
|
|
4975
4975
|
}
|
|
4976
4976
|
async function wt(e) {
|
|
4977
4977
|
if (console.log("Request to refresh visible messages received.", {
|
|
@@ -9828,13 +9828,19 @@ var uf = { class: "w-full" }, df = {
|
|
|
9828
9828
|
await ie();
|
|
9829
9829
|
});
|
|
9830
9830
|
async function ae() {
|
|
9831
|
+
console.log("Ensuring conversation is loaded for chatUid:", f.chatUid);
|
|
9831
9832
|
let e = T.value;
|
|
9832
|
-
if (e) {
|
|
9833
|
-
|
|
9834
|
-
|
|
9835
|
-
|
|
9836
|
-
|
|
9837
|
-
|
|
9833
|
+
if (!e) {
|
|
9834
|
+
console.warn("No active client available.");
|
|
9835
|
+
return;
|
|
9836
|
+
}
|
|
9837
|
+
x.value = !0, v.value = !1, C.value = !1;
|
|
9838
|
+
try {
|
|
9839
|
+
e.conversations.value.length === 0 && (console.log("No conversations found, fetching conversations from server."), await e.fetchConversations());
|
|
9840
|
+
let t = e.conversations.value.find((e) => e.targetId === f.chatUid || e.id === f.chatUid) ?? null;
|
|
9841
|
+
if (!t) {
|
|
9842
|
+
console.log("Conversation not found, attempting to resolve by group UID.");
|
|
9843
|
+
try {
|
|
9838
9844
|
t = await se(f.chatUid, e);
|
|
9839
9845
|
} catch (e) {
|
|
9840
9846
|
if (e && typeof e == "object" && "code" in e && e.code === "ERR_NOT_A_MEMBER") {
|
|
@@ -9842,14 +9848,17 @@ var uf = { class: "w-full" }, df = {
|
|
|
9842
9848
|
return;
|
|
9843
9849
|
}
|
|
9844
9850
|
}
|
|
9845
|
-
if (!t) {
|
|
9846
|
-
v.value = !0, C.value = !1, p("chatMembersFetched", []);
|
|
9847
|
-
return;
|
|
9848
|
-
}
|
|
9849
|
-
e.activeConversationId.value !== t.id && await e.selectConversation(t.id), await M(t.targetId);
|
|
9850
|
-
} finally {
|
|
9851
|
-
x.value = !1;
|
|
9852
9851
|
}
|
|
9852
|
+
if (!t) {
|
|
9853
|
+
console.log("Conversation not found after attempting to resolve by group UID."), v.value = !0, C.value = !1, p("chatMembersFetched", []);
|
|
9854
|
+
return;
|
|
9855
|
+
}
|
|
9856
|
+
console.log("Conversation found:", {
|
|
9857
|
+
conversation: t,
|
|
9858
|
+
activeConversationId: e.activeConversationId.value
|
|
9859
|
+
}), e.activeConversationId.value !== t.id && (console.log("Selecting conversation:", t.id), await e.selectConversation(t.id)), console.log("Fetching group members for conversation:", t.id), await M(t.targetId);
|
|
9860
|
+
} finally {
|
|
9861
|
+
x.value = !1;
|
|
9853
9862
|
}
|
|
9854
9863
|
}
|
|
9855
9864
|
async function se(e, t) {
|