OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-orgs commits / f734fcb

createOrgInvite/joinOrg thread invite source (owner URL) #35
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
f734fcb1a274ed5ba18d8995f07d8f3213462f0a
by plankatron <fleeky@gmail.com> · 2026-05-25T00:54:07.000Z

Changed files (1) +4 -1

lib/hyper-orgs.js +4 -1
……@@ -230,6 +230,7 @@ export class HyperOrgs {
230230 kind: 'org',
231231 name,
232232 roles: [opts.role || 'reader'],
233 source: opts.source || null,
233234 expiresAt: opts.expiresAt || null,
234235 maxUses: opts.maxUses == null ? 1 : opts.maxUses
235236 })
……@@ -251,7 +252,9 @@ export class HyperOrgs {
251252 if (decoded.kind !== 'org') throw new Error(`invite is for "${decoded.kind}", not an org`)
252253 if (isExpired(decoded)) throw new Error('invite expired')
253254 if (!decoded.name) throw new Error('org invite missing name (cannot key the org)')
254 return this.mountOrg(decoded.name, decoded.bootstrapKey, decoded.roles[0] || 'reader')
255 const res = await this.mountOrg(decoded.name, decoded.bootstrapKey, decoded.roles[0] || 'reader')
256 // `source` (owner serverKey) lets the caller request write-enrollment.
257 return { ...res, source: decoded.source || null }
255258 }
256259
257260 /**