Fix prototype state user isolation

This commit is contained in:
Mikhail Putilovskij 2026-04-08 01:30:37 +03:00
parent 19c85db89a
commit fabedb105b
2 changed files with 7 additions and 2 deletions

View file

@ -44,7 +44,7 @@ class PrototypeStateStore:
if existing is not None:
stored = existing.model_copy(update={"is_new": False})
self._users[key] = stored
return stored
return stored.model_copy()
user = User(
user_id=f"usr-{platform}-{external_id}",
@ -55,7 +55,7 @@ class PrototypeStateStore:
is_new=True,
)
self._users[key] = user
return user
return user.model_copy()
async def get_settings(self, user_id: str) -> UserSettings:
stored = self._settings.get(user_id, {})