diff options
| author | Adam Soltys <[email protected]> | 2026-10-06 11:22:06 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-06 11:22:06 -0700 |
| commit | d657d79bc95062a8fc5e128e795e23bcefd0bf04 (patch) | |
| tree | 04a9d39281ce7784f1a4a966f0a532194ee7ded7 /src/mls.js | |
| parent | f571e46937d423d9ba44154a92aeb4136466daaa (diff) | |
| download | coinosv3-d657d79bc95062a8fc5e128e795e23bcefd0bf04.tar.gz coinosv3-d657d79bc95062a8fc5e128e795e23bcefd0bf04.zip | |
Cordn group chats: MLS groups delivered through a coordinator (Amethyst 1.17 interop)
src/contextvm.js speaks ContextVM (kind 25910 inside ephemeral gift wraps)
to a coordinator; src/cordn.js is the protocol (KeyPackages with hex-text
identities, the 0xC04D metadata extension, exporter-keyed ChaCha20 sealing,
unsigned nostr-shaped envelopes with the sender as MLS AAD, cordn1 group
refs, a record engine like marmot.js); src/cordn-client.js mirrors
marmot-client.js with the same interface, so the Messages group screens
drive both — New group gains a White Noise / Cordn toggle.
Verified against @cordn/cli (ts-mls) on the public coordinator both ways,
from the engine (tools/cordn-interop-test.js) and from the real app
(tools/cordn-ui-test.js). mls.js: the OpenMLS required_capabilities rule for
GroupContextExtensions now applies only to groups that carry one.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YRC6aKhwAud231ot9FPmhi
Diffstat (limited to 'src/mls.js')
| -rw-r--r-- | src/mls.js | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1578,9 +1578,13 @@ const applyProposals = (s, list, committer, { appData, psks, now, own } = {}) => let extensions = gce.length ? gce[0].proposal.extensions : s.extensions; if (gce.length) { uniqueTypes(extensions, "group context"); - // an OpenMLS rule, not an RFC one: whatever the context carries must be required of every member - let required = requiredCapabilities(extensions)?.extensions || []; - if (!extensions.every((e) => supportsExtension({ extensions: required }, e.type))) + // An OpenMLS rule, not an RFC one: whatever the context carries must be + // required of every member. Applied where the group plays by it (a + // required_capabilities extension in the context, as White Noise groups + // have); a ts-mls group (Cordn) carries none and changes its metadata + // extension freely, as the RFC allows. + let required = requiredCapabilities(extensions)?.extensions; + if (required && !extensions.every((e) => supportsExtension({ extensions: required }, e.type))) fail("group context extension type missing from required_capabilities"); // with app_data_update required, the dictionary only changes through app_data_update if (requiresAppDataUpdate(s.extensions) || requiresAppDataUpdate(extensions)) { |
