@trap_stevo/filetide-client 0.0.23 → 0.0.25

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.
@@ -282,9 +282,16 @@ class FileTideClient {
282
282
  if (clientOnline && clientOnline.online && clientOnline.client.id !== this.connectionID) {
283
283
  FileTide.outputGradient(`[${this.deviceName}] Client name taken ~ ${this.deviceName}`, ["#4D96FF", "#89CFF0"]);
284
284
  } else if (!clientOnline || !clientOnline.online || clientOnline.client.id === this.connectionID) {
285
- this.currentDeviceName = this.deviceName;
285
+ const pDeviceName = this.deviceName;
286
+ this.currentDeviceName = pDeviceName;
287
+ this.clientDisconnected = true;
288
+ const transferStates = fileTide.getTidingTransferStates();
289
+ this.fileMessagerInstance.clientTide.emitEvent(this.currentDeviceName || pDeviceName, "client-offline", {
290
+ clientID: this.currentDeviceName || pDeviceName,
291
+ connectionID: this.connectionID,
292
+ disconnectedDuringTransfer: transferStates.size > 0 ? true : false
293
+ });
286
294
  this.deviceName = clientID;
287
- this.fileMessagerInstance.clientTide.emitEvent(this.currentDeviceName, "client-offline", this.currentDeviceName);
288
295
  FileTide.outputGradient(`[${this.deviceName}] Updated client name to ${this.deviceName}`, ["#4D96FF", "#89CFF0"]);
289
296
  this.startClient({}, {}, {}, {}, onReconnect);
290
297
  updatedClientID = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trap_stevo/filetide-client",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "description": "Seamless, real-time file transfers between devices with effortless connectivity. Allowing for powerful, instant, secure, and cross-platform file sharing, enabling efficient and reliable data transfers in any network environment.",
5
5
  "main": "dist/cjs/FileTideClient.js",
6
6
  "exports": {