You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tg auth login / login-qr don't update activeAccount in config.json, so the next command uses the configured account #62
tg auth login and tg auth login-qr make the account they log in active in data.db, but they don't touch activeAccount in config.json. Every command except tg config and tg skill applies activeAccount again at startup, so with the key set the command after a login uses the configured account, not the one just logged in.
Example: account 1 exists and config.json has "activeAccount": 1. tg auth login --phone +15550000002 adds account 2 and makes it active; the next tg chats list reads account 1 again.
Today the workaround is tg accounts switch --id <id>, which since #61 writes the new ID to activeAccount when the key is set (docs/configuration.md, Runtime Behavior).
Fix: after a successful login, write the account's ID to activeAccount when config.json already sets it (the same rule as tg accounts switch), and never create config.json otherwise. Done when an offline test covers both login paths with and without the key; that likely needs a hook in AuthDependencies so the test doesn't reach Telegram.
Activity
fix(auth): make a login's account the only active one, once it succeeds
docs: add the changelog entries for the 0.4.1 bug fixes