@connectycube/chat-widget 0.46.0 → 0.46.1
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.es.js
CHANGED
|
@@ -672,7 +672,10 @@ const aV = "@connectycube/chat-widget:session", XA = "@connectycube/chat-widget:
|
|
|
672
672
|
}, ae = () => {
|
|
673
673
|
const q = Nq();
|
|
674
674
|
return te(q);
|
|
675
|
-
}, oA = (q) =>
|
|
675
|
+
}, oA = (q) => {
|
|
676
|
+
const { userStatus: A } = te(q || Nq()) || {}, V = typeof A == "string" ? A.toLowerCase() : "available";
|
|
677
|
+
return V === "away" ? "away" : V === "busy" ? "busy" : V === "unknown" ? "unknown" : "available";
|
|
678
|
+
}, mA = async (q, A = !1) => {
|
|
676
679
|
const V = ae(), e = Object.assign({}, V, q), o = JSON.stringify(e), r = Tq();
|
|
677
680
|
let n = Nq();
|
|
678
681
|
return n && A ? n = { ...n, custom_data: o } : n = (await oq.users.update({ custom_data: o })).user, r && fA({ ...r, user: n }, rA()), n;
|