Persist canonical prototype user state

This commit is contained in:
Mikhail Putilovskij 2026-04-08 01:29:02 +03:00
parent 083be77404
commit 19c85db89a
2 changed files with 4 additions and 1 deletions

View file

@ -42,7 +42,9 @@ class PrototypeStateStore:
key = f"{platform}:{external_id}"
existing = self._users.get(key)
if existing is not None:
return existing.model_copy(update={"is_new": False})
stored = existing.model_copy(update={"is_new": False})
self._users[key] = stored
return stored
user = User(
user_id=f"usr-{platform}-{external_id}",