@bcc-code/vue-bcc-chat-ui 7.1.50 → 7.1.52
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
CHANGED
|
@@ -529,8 +529,8 @@ function $t(e) {
|
|
|
529
529
|
}
|
|
530
530
|
async function en(e) {
|
|
531
531
|
try {
|
|
532
|
-
let t = await H.getGroup(e);
|
|
533
|
-
return
|
|
532
|
+
let t = await H.getGroup(e), n = t?.getMetadata?.(), r = t?.getHasJoined?.() ?? !1;
|
|
533
|
+
return n?.isChannel === !0 && !r;
|
|
534
534
|
} catch {
|
|
535
535
|
return !1;
|
|
536
536
|
}
|
|
@@ -6616,13 +6616,13 @@ function Zu(e) {
|
|
|
6616
6616
|
fetchErrorFallback: e.fetchErrorFallback
|
|
6617
6617
|
}), a = w(e.getInitialScheduledMessagesOpen()), o = n(() => !!t.value?.scheduledMessages.value.length), s = n(() => t.value?.loadingScheduledMessages.value ?? !1), c = n(() => t.value?.scheduledMessages.value ?? []);
|
|
6618
6618
|
async function l() {
|
|
6619
|
-
let
|
|
6620
|
-
!
|
|
6619
|
+
let n = t.value, i = r.value;
|
|
6620
|
+
!n || !i || !e.canScheduleMessages() || (await n.fetchScheduledMessages(i.targetId), a.value = !0);
|
|
6621
6621
|
}
|
|
6622
6622
|
async function u() {
|
|
6623
|
-
let
|
|
6624
|
-
if (e) try {
|
|
6625
|
-
await
|
|
6623
|
+
let n = t.value, i = r.value;
|
|
6624
|
+
if (!(!n || !i || !e.canScheduleMessages())) try {
|
|
6625
|
+
await n.fetchScheduledMessages(i.targetId);
|
|
6626
6626
|
} catch {}
|
|
6627
6627
|
}
|
|
6628
6628
|
return {
|
|
@@ -6770,7 +6770,7 @@ function od(e, t, n) {
|
|
|
6770
6770
|
function sd(e) {
|
|
6771
6771
|
let t = w([]), n = `bcc-chat-group-${crypto.randomUUID()}`;
|
|
6772
6772
|
async function r(n) {
|
|
6773
|
-
if (e.isChannel()) {
|
|
6773
|
+
if (e.isChannel() || !e.hasJoined()) {
|
|
6774
6774
|
t.value = [], e.onMembersChanged([]);
|
|
6775
6775
|
return;
|
|
6776
6776
|
}
|
|
@@ -6787,7 +6787,7 @@ function sd(e) {
|
|
|
6787
6787
|
}
|
|
6788
6788
|
function i(n, r, i, a) {
|
|
6789
6789
|
let o = e.getConversationTargetId(), s = n?.getGuid?.();
|
|
6790
|
-
if (!o || !s || s !== o || e.isChannel()) return;
|
|
6790
|
+
if (!o || !s || s !== o || e.isChannel() || !e.hasJoined()) return;
|
|
6791
6791
|
let c = {
|
|
6792
6792
|
uid: r.getUid(),
|
|
6793
6793
|
displayName: r.getName(),
|
|
@@ -9924,6 +9924,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9924
9924
|
}), { groupMembers: A, fetchGroupMembers: M } = sd({
|
|
9925
9925
|
getConversationTargetId: () => O.value?.targetId,
|
|
9926
9926
|
isChannel: () => Du(O.value),
|
|
9927
|
+
hasJoined: () => Ou(O.value),
|
|
9927
9928
|
onMembersChanged: (e) => {
|
|
9928
9929
|
p("chatMembersFetched", e), T.value?.rememberMentionDisplayNames(e);
|
|
9929
9930
|
}
|
|
@@ -9956,6 +9957,7 @@ var bf = { class: "w-full" }, xf = {
|
|
|
9956
9957
|
let te = n(() => P.messages.value.length > 0), L = n(() => f.showHeader ?? f.showMessageHeader), R = Zu({
|
|
9957
9958
|
chatClient: T,
|
|
9958
9959
|
selectedConversation: O,
|
|
9960
|
+
canScheduleMessages: () => !ee.isReadOnly.value,
|
|
9959
9961
|
getInitialScheduledMessagesOpen: () => !!f.initialScheduledMessagesOpen,
|
|
9960
9962
|
fetchErrorFallback: m("loadMessageReceiptsError")
|
|
9961
9963
|
});
|