From 796999cb8a6fc7abbfb9dc2643e372795fed9882 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 2 Dec 2026 10:40:45 -0700 Subject: users: stamp v3migrated when an account hands its name to v3 `migrated` has been set on every new account since 2023, so it can't tell the names registrar whether an account actually handed its name over. When the account's own session posts the hand-off, also record a server-set `v3migrated` timestamp, and include it in the public user fields so the registrar can require a fresh one before granting the name. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01VMan6SSfVopM1ZzXKZmLYU --- routes/users.ts | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'routes') diff --git a/routes/users.ts b/routes/users.ts index a058e7da..17bf5026 100644 --- a/routes/users.ts +++ b/routes/users.ts @@ -497,6 +497,12 @@ export default { if (typeof body[a] !== "undefined") user[a] = body[a]; } + // A v3 hand-off from the /migrate action. Not the same thing as + // `migrated`, which every account has carried since 2023. Only the + // server sets this, and the names registrar grants the name to a v3 + // key only while it is fresh. + if (body.migrated === true) user.v3migrated = Date.now(); + user.fresh = false; user.tip = Math.max(0, Math.min(1000, Number.parseInt(user.tip))); -- cgit v1.2.3