@phonghq/go-chat 1.0.58 → 1.0.59

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.
@@ -214,11 +214,14 @@ defineExpose({
214
214
  startCall: async () => {
215
215
  await callingRef.value?.answer();
216
216
  },
217
- endCall: () => callingRef.value?.endCall(),
217
+ endCall: () => {
218
+ console.log('9999999999999999999999999999999');
219
+ callingRef.value?.endCall();
220
+ },
218
221
  openSettings,
219
222
  initData: (data) => handleExposeInit(data),
220
223
  backToHome,
221
- closeCallingModal: () => callingRef.value?.closeModal(),
224
+ closeCallingModal: () => callingRef.value?.closeModal()
222
225
  });
223
226
  debugger; /* PartiallyEnd: #3632/scriptSetup.vue */
224
227
  const __VLS_defaults = {
@@ -31,11 +31,13 @@ const handlePlivoCallBack = (status, data) => {
31
31
  getUserOffer(data?.phone ?? '');
32
32
  }
33
33
  else if (status == PLIVO_CALL_STATUS.CONNECT_FAILED || status == PLIVO_CALL_STATUS.NO_ANSWER) {
34
+ console.log('5555555555555555555555555555555555555555555');
34
35
  endCall();
35
36
  }
36
37
  else if (status == PLIVO_CALL_STATUS.CALL_END) {
37
38
  errorMessage.value = data?.message ?? '';
38
39
  const closeModal = data?.reason == 'ORIGINATOR_CANCEL';
40
+ console.log('6666666666666666666666666666666666666666666666666');
39
41
  endCall({ closeModal });
40
42
  }
41
43
  else if (status == PLIVO_CALL_STATUS.CALL_START) {
@@ -98,6 +100,7 @@ onUnmounted(() => {
98
100
  clearInterval(timer);
99
101
  if (timeOut)
100
102
  clearTimeout(timeOut);
103
+ console.log('7777777777777777777777777777777777777777777777777');
101
104
  endCall();
102
105
  errorMessage.value = '';
103
106
  });
@@ -116,6 +119,7 @@ function startTimer() {
116
119
  }, 1000);
117
120
  }
118
121
  function endCall(option) {
122
+ console.log('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
119
123
  if (option?.closeModal) {
120
124
  closeModal();
121
125
  }
@@ -202,6 +206,7 @@ const startCall = async (data) => {
202
206
  callStatus.value = PLIVO_CALL_STATUS.CALLING;
203
207
  }
204
208
  catch (e) {
209
+ console.log('111111111111111111111111');
205
210
  endCall();
206
211
  console.log(e);
207
212
  errorMessage.value = e?.message || JSON.stringify(e);
@@ -213,6 +218,7 @@ const answer = async () => {
213
218
  await plivoCallAnswer();
214
219
  }
215
220
  catch (e) {
221
+ console.log('222222222222222222222222222222');
216
222
  endCall();
217
223
  callStatus.value = PLIVO_CALL_STATUS.CONNECT_FAILED;
218
224
  errorMessage.value = e?.message || JSON.stringify(e);
@@ -242,6 +248,7 @@ const getUserOffer = async (phone) => {
242
248
  };
243
249
  const handleTimeLimitError = () => {
244
250
  errorMessage.value = 'Call time limit reached. This call has ended.';
251
+ console.log('3333333333333333333333333333333333333333333333');
245
252
  endCall();
246
253
  };
247
254
  const exportRecordFile = async () => {
@@ -249,6 +256,7 @@ const exportRecordFile = async () => {
249
256
  };
250
257
  const handleAfterClose = () => {
251
258
  record_link.value = '';
259
+ errorMessage.value = '';
252
260
  uuidEnd = '';
253
261
  };
254
262
  let __VLS_exposed;
@@ -46806,7 +46806,7 @@ const K6 = 5, qc = async () => {
46806
46806
  const i = new TextDecoder("utf-8");
46807
46807
  t = JSON.parse(i.decode(e));
46808
46808
  }
46809
- eu.filter((i) => i.topic === V).forEach((i) => {
46809
+ console.log(t, `Received from ${V}`), eu.filter((i) => i.topic === V).forEach((i) => {
46810
46810
  i.callBack(V, t);
46811
46811
  });
46812
46812
  } catch (t) {
@@ -71270,11 +71270,11 @@ const Siq = /* @__PURE__ */ FV(Biq, [["render", Tiq]]), Riq = { class: "text-sm
71270
71270
  else if (F == aV.CHECK_USER_OFFER)
71271
71271
  L((U == null ? void 0 : U.phone) ?? "");
71272
71272
  else if (F == aV.CONNECT_FAILED || F == aV.NO_ANSWER)
71273
- Y();
71273
+ console.log("5555555555555555555555555555555555555555555"), Y();
71274
71274
  else if (F == aV.CALL_END) {
71275
71275
  m.value = (U == null ? void 0 : U.message) ?? "";
71276
71276
  const z = (U == null ? void 0 : U.reason) == "ORIGINATOR_CANCEL";
71277
- Y({ closeModal: z });
71277
+ console.log("6666666666666666666666666666666666666666666666666"), Y({ closeModal: z });
71278
71278
  } else F == aV.CALL_START ? ((tq = _.value) == null || tq.pause(), x()) : F == aV.MEDIA_PERMISSION_FAIL && yG();
71279
71279
  }, {
71280
71280
  plivoLogin: n,
@@ -71310,7 +71310,7 @@ const Siq = /* @__PURE__ */ FV(Biq, [["render", Tiq]]), Riq = { class: "text-sm
71310
71310
  Nf("We’re having trouble connecting the call. Please try again in a moment");
71311
71311
  }
71312
71312
  }), Mi(() => {
71313
- I && clearInterval(I), Y(), m.value = "";
71313
+ I && clearInterval(I), console.log("7777777777777777777777777777777777777777777777777"), Y(), m.value = "";
71314
71314
  });
71315
71315
  function x() {
71316
71316
  let F = 0;
@@ -71322,7 +71322,7 @@ const Siq = /* @__PURE__ */ FV(Biq, [["render", Tiq]]), Riq = { class: "text-sm
71322
71322
  }
71323
71323
  function Y(F) {
71324
71324
  var U;
71325
- F != null && F.closeModal && T(), (U = _.value) == null || U.pause(), G(g.value, D), s(a.value), a.value = aV.CALL_END, clearInterval(I), h.value = !1, E.value = !1, f.value = "00:00", I && clearInterval(I), D = "";
71325
+ console.log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"), F != null && F.closeModal && T(), (U = _.value) == null || U.pause(), G(g.value, D), s(a.value), a.value = aV.CALL_END, clearInterval(I), h.value = !1, E.value = !1, f.value = "00:00", I && clearInterval(I), D = "";
71326
71326
  }
71327
71327
  const T = () => {
71328
71328
  var F;
@@ -71361,13 +71361,13 @@ const Siq = /* @__PURE__ */ FV(Biq, [["render", Tiq]]), Riq = { class: "text-sm
71361
71361
  }
71362
71362
  D = "call", await r(F.phone), a.value = aV.CALLING;
71363
71363
  } catch (U) {
71364
- Y(), console.log(U), m.value = (U == null ? void 0 : U.message) || JSON.stringify(U), a.value = aV.CONNECT_FAILED;
71364
+ console.log("111111111111111111111111"), Y(), console.log(U), m.value = (U == null ? void 0 : U.message) || JSON.stringify(U), a.value = aV.CONNECT_FAILED;
71365
71365
  }
71366
71366
  }, Q = async () => {
71367
71367
  try {
71368
71368
  await o();
71369
71369
  } catch (F) {
71370
- Y(), a.value = aV.CONNECT_FAILED, m.value = (F == null ? void 0 : F.message) || JSON.stringify(F);
71370
+ console.log("222222222222222222222222222222"), Y(), a.value = aV.CONNECT_FAILED, m.value = (F == null ? void 0 : F.message) || JSON.stringify(F);
71371
71371
  }
71372
71372
  }, L = async (F) => {
71373
71373
  var z;
@@ -71388,7 +71388,7 @@ const Siq = /* @__PURE__ */ FV(Biq, [["render", Tiq]]), Riq = { class: "text-sm
71388
71388
  };
71389
71389
  g.value = tq, a.value !== aV.CALL_END && a.value !== aV.CHECK_USER_OFFER && t("userCalling", g.value);
71390
71390
  }, $ = () => {
71391
- m.value = "Call time limit reached. This call has ended.", Y();
71391
+ m.value = "Call time limit reached. This call has ended.", console.log("3333333333333333333333333333333333333333333333"), Y();
71392
71392
  }, P = async () => {
71393
71393
  liq(v.value);
71394
71394
  }, Vq = () => {
@@ -71487,7 +71487,7 @@ const Siq = /* @__PURE__ */ FV(Biq, [["render", Tiq]]), Riq = { class: "text-sm
71487
71487
  }, null, 8, Qiq)
71488
71488
  ], 64));
71489
71489
  }
71490
- }), Fiq = /* @__PURE__ */ FV(Piq, [["__scopeId", "data-v-27f10293"]]), jiq = ["onClick"], Liq = { class: "cursor-pointer" }, Ziq = /* @__PURE__ */ Hq({
71490
+ }), Fiq = /* @__PURE__ */ FV(Piq, [["__scopeId", "data-v-b23c5e55"]]), jiq = ["onClick"], Liq = { class: "cursor-pointer" }, Ziq = /* @__PURE__ */ Hq({
71491
71491
  __name: "SelectBase",
71492
71492
  props: {
71493
71493
  modelValue: {},
@@ -72229,7 +72229,7 @@ const gnq = /* @__PURE__ */ FV(vnq, [["render", _nq]]), ynq = { class: "w-[480px
72229
72229
  },
72230
72230
  endCall: () => {
72231
72231
  var G;
72232
- return (G = h.value) == null ? void 0 : G.endCall();
72232
+ console.log("9999999999999999999999999999999"), (G = h.value) == null || G.endCall();
72233
72233
  },
72234
72234
  openSettings: S,
72235
72235
  initData: (G) => s(G),