@gryt/core 0.17.0 → 0.17.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.
@@ -1,7 +1,7 @@
1
1
  /* An in-memory stand-in for the delivery service in Gryt-chat/server#241, for tests only.
2
2
  Same answers and pushes; no auth, blocks, rate limits or member checks on adds. */
3
3
  import { base64UrlDecode, inspectMlsMessage, mlsWelcomeRefs, readMlsKeyPackage } from "@gryt/crypto";
4
- const MAX_DEVICES = 5;
4
+ const MAX_DEVICES = 100;
5
5
  const MAX_KEY_PACKAGES = 20;
6
6
  const MAX_LOG_PAGE = 200;
7
7
  const DUPLICATE_WINDOW = 100;
@@ -95,7 +95,7 @@ export class FakeDeliveryService {
95
95
  this.stats.publishes += 1;
96
96
  const isNew = !this.isDevice(me, deviceId);
97
97
  if (isNew && (this.devices.get(me) ?? []).length >= MAX_DEVICES) {
98
- return fail("too_many_devices", "You have five devices using encrypted messages here.");
98
+ return fail("too_many_devices", "You have 100 devices using encrypted messages here.");
99
99
  }
100
100
  const raw = [...keyPackages.map((b) => ({ b, lastResort: false }))];
101
101
  if (lastResort)
@@ -1,6 +1,6 @@
1
1
  import { addMlsMembers, asIdentityScope, base64UrlDecode, createMlsGroup, decodeMlsGroupState, encodeMlsGroupState, encryptMlsMessage, forgetMlsSecrets, generateMlsKeyPackage, joinMlsGroup, mlsGroupInfo, mlsGroupMembers, mlsWelcomeRefs, processMlsMessage, readDeviceCertificate, readMlsKeyPackage, removeMlsMembers, } from "@gryt/crypto";
2
- /** Five devices per person per server (design, section 1). The server holds the same line. */
3
- const MLS_MAX_DEVICES_PER_PERSON = 5;
2
+ /** Devices per person per server. Must match the server's MLS_MAX_DEVICES, or extra devices are left out quietly. */
3
+ const MLS_MAX_DEVICES_PER_PERSON = 100;
4
4
  const COMMIT_ATTEMPTS = 5;
5
5
  /** socket.io closes the connection on a packet with more than 10 binary parts (GRYT-1522). */
6
6
  const MAX_BINARY_PARTS = 10;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gryt/core",
3
- "version": "0.17.0",
3
+ "version": "0.17.1",
4
4
  "description": "Gryt's shared application logic: one implementation of the things the desktop and mobile apps both do.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {