peer-term 1.4.7 → 1.4.8

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +5 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peer-term",
3
- "version": "1.4.7",
3
+ "version": "1.4.8",
4
4
  "license": "MIT",
5
5
  "description": "Share your terminal instantly using a 6-digit code or QR code. Encrypted. No config.",
6
6
  "repository": {
package/src/index.js CHANGED
@@ -105,7 +105,7 @@ export class Session {
105
105
  const modeStr = this.readonly ? 'READ-ONLY' : 'INTERACTIVE (write enabled)';
106
106
  const codeLabel = this.code ? `Session ${this.code}` : 'Session';
107
107
  this.log(`${codeLabel} is now ${modeStr}`);
108
- if (this.sharedKey) {
108
+ if (this.sharedKey && this.fingerprintAuthorized) {
109
109
  await this._sendSessionConfig();
110
110
  }
111
111
  return this.readonly;
@@ -263,7 +263,10 @@ export class Session {
263
263
  });
264
264
  try {
265
265
  const payload = await encrypt(this.sharedKey, config);
266
- this._sendEncryptedToClient(payload);
266
+ this._sendEncryptedToClient(payload, {
267
+ directPayload: JSON.stringify({ _meta: 'session-config', payload }),
268
+ meta: 'session-config',
269
+ });
267
270
  } catch (err) {
268
271
  this.log(`Failed to send session config: ${err.message}`);
269
272
  }