webitel-sdk 26.4.29 → 26.4.31
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/index.cjs +7 -2
- package/index.cjs.map +1 -1
- package/index.mjs +7 -2
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/socket/socket.d.ts.map +1 -1
- package/version.d.ts +1 -1
package/index.mjs
CHANGED
|
@@ -66703,7 +66703,7 @@ _defineProperty(SipPhone$1, "userAgent", `Webitel-Phone/${version$1}`);
|
|
|
66703
66703
|
_defineProperty(SipPhone$1, "sipVersion", version$1);
|
|
66704
66704
|
//#endregion
|
|
66705
66705
|
//#region src/version.ts
|
|
66706
|
-
const version = "26.4.
|
|
66706
|
+
const version = "26.4.31";
|
|
66707
66707
|
//#endregion
|
|
66708
66708
|
//#region src/socket/errors.ts
|
|
66709
66709
|
/**
|
|
@@ -69960,7 +69960,7 @@ var Conversation = class {
|
|
|
69960
69960
|
*/
|
|
69961
69961
|
messageMember(msg) {
|
|
69962
69962
|
if (this.member && msg.channel_id === this.channelId) return { self: true };
|
|
69963
|
-
for (const m of this.members) if (m.id === msg.channel_id) return m;
|
|
69963
|
+
for (const m of this.members) if (msg.channel_id !== "" && m.id === msg.channel_id) return m;
|
|
69964
69964
|
return null;
|
|
69965
69965
|
}
|
|
69966
69966
|
};
|
|
@@ -70017,6 +70017,11 @@ var Socket = class extends EventEmitter {
|
|
|
70017
70017
|
* @param code Код закриття з'єднання (необов'язково).
|
|
70018
70018
|
*/
|
|
70019
70019
|
close(code) {
|
|
70020
|
+
if (!this.socket) {
|
|
70021
|
+
const stackTrace = (/* @__PURE__ */ new Error("Socket is not open")).stack;
|
|
70022
|
+
console.warn(`Socket is not open\n`, stackTrace);
|
|
70023
|
+
return;
|
|
70024
|
+
}
|
|
70020
70025
|
this.socket.close(code || 1e3);
|
|
70021
70026
|
delete this.socket;
|
|
70022
70027
|
this.onClose(code || 1e3);
|