@crypticat/core
Advanced tools
Comparing version 0.2.5 to 0.2.6
@@ -25,3 +25,2 @@ /// <reference types="node" /> | ||
private linkState; | ||
private linkedNextYet; | ||
private nick; | ||
@@ -28,0 +27,0 @@ private ws?; |
@@ -29,3 +29,2 @@ "use strict"; | ||
}; | ||
this.linkedNextYet = false; | ||
this.nick = null; | ||
@@ -76,4 +75,3 @@ } | ||
const dir = action === 'PREV_LINK' ? 'prev' : 'next'; | ||
if (action === 'NEXT_LINK' && !this.linkedNextYet) { | ||
this.linkedNextYet = true; | ||
if (action === 'NEXT_LINK' && !this.linkState.next) { | ||
this.emit('connect', payload.uid, (_a = payload.nick) !== null && _a !== void 0 ? _a : null); | ||
@@ -85,4 +83,3 @@ this.sendEncrypted('prev', { | ||
} | ||
else if (this.linkedNextYet) { | ||
console.log('DISCONNECTED', dir); | ||
else if (this.linkState.next) { | ||
lib_1.assertDefined(this.linkState[dir]); | ||
@@ -173,3 +170,2 @@ this.emit('disconnect', (_b = this.linkState[dir]) === null || _b === void 0 ? void 0 : _b.uid, (_d = (_c = this.linkState[dir]) === null || _c === void 0 ? void 0 : _c.nick) !== null && _d !== void 0 ? _d : null); | ||
this.linkState.prev = null; | ||
this.linkedNextYet = false; | ||
yield lib_1.waitFor(this.ws, 'ROOM_READY'); | ||
@@ -176,0 +172,0 @@ }); |
{ | ||
"name": "@crypticat/core", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "Crypticat's core client and server implementation", | ||
@@ -5,0 +5,0 @@ "author": "Kognise <felix.mattick@gmail.com>", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37525
478