@threadbase-sh/streamer 1.61.0 → 1.61.1

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/index.js CHANGED
@@ -16584,13 +16584,16 @@ var StreamerServer = class {
16584
16584
  json(res, 400, { error: "Missing token or clientPublicKey" });
16585
16585
  return;
16586
16586
  }
16587
- let e2eeRequest;
16588
- try {
16589
- e2eeRequest = parseE2eeRequest(body?.e2ee);
16590
- } catch (err) {
16591
- const e = err;
16592
- json(res, 400, { error: e.message, code: e.code });
16593
- return;
16587
+ const e2eeEnabled = describeE2eeCapability(this.featureFlags.e2ee).enabled;
16588
+ let e2eeRequest = null;
16589
+ if (e2eeEnabled) {
16590
+ try {
16591
+ e2eeRequest = parseE2eeRequest(body?.e2ee);
16592
+ } catch (err) {
16593
+ const e = err;
16594
+ json(res, 400, { error: e.message, code: e.code });
16595
+ return;
16596
+ }
16594
16597
  }
16595
16598
  const precheck = this.pairTokens.wouldConsume(token);
16596
16599
  if (!precheck.ok) {