Add encrypted multi-user server management#53
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| else: | ||
| rows = conn.execute( | ||
| "SELECT * FROM servers WHERE owner_id = ? ORDER BY alias ASC", | ||
| (owner_id,), |
There was a problem hiding this comment.
Migrate existing servers to new owner_id scope
The new user scoping queries in get_all_servers now filter rows by owner_id, but initialize_database only adds the owner_id column with a default of 0 for pre‑existing tables and never backfills it to the current Telegram IDs. On upgrade, all legacy servers keep owner_id=0, so calls like connect_server_menu that pass the real user id will see an empty list and report “no servers configured” until every server is re‑added. A migration/backfill for existing rows (e.g., assigning them to the admin user) or a fallback when owner_id=0 is required to preserve existing servers.
Useful? React with 👍 / 👎.
Summary
Testing
Codex Task