feat: add private expiring workspace invites and restore KAAK home

This commit is contained in:
illusia committed 2026-11-04 17:42:34 +08:00
1 parent 33ba062686
commit 72d7e6e013
39 files changed
+512 -53

No files matched your search

+7
View File
@@ -49,3 +49,10 @@ test("expired tickets do not evict a still-valid join when capacity is reclaimed
assert.deepEqual(tickets.consume(live, 100), payload);
assert.deepEqual(tickets.consume(latest, 100), payload);
});
test("invitation expiry also bounds a previously issued one-use join ticket", () => {
const store = new JoinTicketStore();
const token = store.create({ target: { host: "1.1.1.1", port: 9987 }, serverPassword: "secret", nickname: "Guest", inviteExpiresAt: 2000 }, 1000);
assert.equal(store.consume(token,2000),null);
});