polfan-server-js-client 0.2.53 → 0.2.54

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.
@@ -5,7 +5,12 @@
5
5
  </component>
6
6
  <component name="ChangeListManager">
7
7
  <list default="true" id="831dae43-0da1-47fd-a5f7-33dd5eec2992" name="Changes" comment="Update room on recipient user change">
8
+ <change beforePath="$PROJECT_DIR$/build/index.cjs.js" beforeDir="false" afterPath="$PROJECT_DIR$/build/index.cjs.js" afterDir="false" />
9
+ <change beforePath="$PROJECT_DIR$/build/index.cjs.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/build/index.cjs.js.map" afterDir="false" />
10
+ <change beforePath="$PROJECT_DIR$/build/index.umd.js" beforeDir="false" afterPath="$PROJECT_DIR$/build/index.umd.js" afterDir="false" />
11
+ <change beforePath="$PROJECT_DIR$/build/index.umd.js.map" beforeDir="false" afterPath="$PROJECT_DIR$/build/index.umd.js.map" afterDir="false" />
8
12
  <change beforePath="$PROJECT_DIR$/build/types/types/src/schemes/events/Session.d.ts" beforeDir="false" afterPath="$PROJECT_DIR$/build/types/types/src/schemes/events/Session.d.ts" afterDir="false" />
13
+ <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
9
14
  <change beforePath="$PROJECT_DIR$/src/AbstractChatClient.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/AbstractChatClient.ts" afterDir="false" />
10
15
  <change beforePath="$PROJECT_DIR$/src/WebSocketChatClient.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/WebSocketChatClient.ts" afterDir="false" />
11
16
  </list>
@@ -137,7 +142,7 @@
137
142
  <workItem from="1757108361675" duration="5000" />
138
143
  <workItem from="1759771277022" duration="584000" />
139
144
  <workItem from="1759848250548" duration="413000" />
140
- <workItem from="1761857165939" duration="2585000" />
145
+ <workItem from="1761857165939" duration="2919000" />
141
146
  </task>
142
147
  <task id="LOCAL-00011" summary="Emoticon permissions support">
143
148
  <option name="closed" value="true" />
@@ -2159,7 +2159,7 @@ class WebSocketChatClient extends AbstractChatClient {
2159
2159
  this.ws.send(JSON.stringify(envelope));
2160
2160
  return;
2161
2161
  }
2162
- this.handleEnvelopeSendError(envelope, new Error(`Cannot send; invalid websocket state=${this.ws?.readyState}`));
2162
+ this.handleEnvelopeSendError(envelope, new Error(`Cannot send; invalid websocket state=${this.ws?.readyState ?? '[no connection]'}`));
2163
2163
  }
2164
2164
  onMessage(event) {
2165
2165
  const envelope = JSON.parse(event.data);
@@ -2204,10 +2204,10 @@ class WebSocketChatClient extends AbstractChatClient {
2204
2204
  this.emit(this.Event.error, new Error('Connection timeout'));
2205
2205
  }
2206
2206
  isPendingReadyWsState() {
2207
- return this.ws.readyState === this.ws.CONNECTING || !this.authenticated;
2207
+ return this.ws && this.ws.readyState === this.ws.CONNECTING || !this.authenticated;
2208
2208
  }
2209
2209
  isReadyToSendWsState() {
2210
- return this.ws?.readyState === this.ws.OPEN && this.authenticated;
2210
+ return this.ws && this.ws.readyState === this.ws.OPEN && this.authenticated;
2211
2211
  }
2212
2212
  }
2213
2213
  ;// CONCATENATED MODULE: ./src/WebApiChatClient.ts