@bcc-code/vue-bcc-chat-ui 7.1.22 → 7.1.23

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/index.d.ts CHANGED
@@ -24,10 +24,12 @@ declare const __VLS_base: DefineComponent<__VLS_Props, {
24
24
  chatMembersFetched: (members: ParticipantInfo[]) => any;
25
25
  chatEmpty: () => any;
26
26
  linkClicked: (event: MouseEvent, url: string) => any;
27
+ chatNotAMember: (chatUid: string) => any;
27
28
  }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
28
29
  onChatMembersFetched?: ((members: ParticipantInfo[]) => any) | undefined;
29
30
  onChatEmpty?: (() => any) | undefined;
30
31
  onLinkClicked?: ((event: MouseEvent, url: string) => any) | undefined;
32
+ onChatNotAMember?: ((chatUid: string) => any) | undefined;
31
33
  }>, {
32
34
  chatUid: string;
33
35
  client: ChatClient | null;
@@ -9662,7 +9662,8 @@ var uf = { class: "w-full" }, df = {
9662
9662
  emits: [
9663
9663
  "chatMembersFetched",
9664
9664
  "chatEmpty",
9665
- "linkClicked"
9665
+ "linkClicked",
9666
+ "chatNotAMember"
9666
9667
  ],
9667
9668
  setup(t, { expose: o, emit: u }) {
9668
9669
  function f(e) {
@@ -9774,7 +9775,15 @@ var uf = { class: "w-full" }, df = {
9774
9775
  try {
9775
9776
  e.conversations.value.length === 0 && await e.fetchConversations();
9776
9777
  let t = e.conversations.value.find((e) => e.targetId === p.chatUid || e.id === p.chatUid) ?? null;
9777
- if (t ||= await V(p.chatUid, e), !t) {
9778
+ if (!t) try {
9779
+ t = await V(p.chatUid, e);
9780
+ } catch (e) {
9781
+ if (e && typeof e == "object" && "code" in e && e.code === "ERR_NOT_A_MEMBER") {
9782
+ x.value = !0, m("chatMembersFetched", []), m("chatNotAMember", p.chatUid);
9783
+ return;
9784
+ }
9785
+ }
9786
+ if (!t) {
9778
9787
  x.value = !0, m("chatMembersFetched", []);
9779
9788
  return;
9780
9789
  }