@freesignal/protocol 0.7.4 → 0.7.5
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/node.js +2 -2
- package/package.json +1 -1
package/dist/node.js
CHANGED
|
@@ -138,7 +138,7 @@ class FreeSignalNode {
|
|
|
138
138
|
//console.debug("Sending Handshake Ack");
|
|
139
139
|
const session = yield this.sessions.get(data.sessionTag);
|
|
140
140
|
if (!session)
|
|
141
|
-
throw new Error("Session not found for
|
|
141
|
+
throw new Error("Session not found for sessionTag: " + data.sessionTag);
|
|
142
142
|
this.emitter.emit('send', yield this.encrypt(session.userId, types_1.Protocols.HANDSHAKE, crypto_1.default.ECDH.scalarMult(this.privateIdentityKey.exchangeKey, session.identityKey.exchangeKey)));
|
|
143
143
|
return;
|
|
144
144
|
}
|
|
@@ -262,7 +262,7 @@ class FreeSignalNode {
|
|
|
262
262
|
const session = yield this.sessions.get(sessionTag);
|
|
263
263
|
if (!session)
|
|
264
264
|
throw new Error("Session not found for sessionTag: " + datagram.sessionTag);
|
|
265
|
-
this.emitter.emit('send', { session,
|
|
265
|
+
this.emitter.emit('send', { session, datagram: types_1.Datagram.from(opened.payload.slice(types_1.UserId.keyLength)), userId: session.userId });
|
|
266
266
|
return;
|
|
267
267
|
}
|
|
268
268
|
case types_1.Protocols.DISCOVER: {
|