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 accounts switch is undone by activeAccount in config.json #61
tg accounts switch --id 2 sets is_active in data.db, but on every start (except tg config) the CLI applies activeAccount from config.json again (syncActiveAccountFromConfig in src/config/index.ts). So with "activeAccount": 1 in the config, the switch lasts for that command only: the next command switches back to account 1.
Since #17 each account has its own cache, so this decides which account's chats, messages and tg sql rows a command without --account returns.
Example: accounts 1 (+15550000001) and 2 (+15550000002), tg config set activeAccount 1, then tg accounts switch --id 2; tg chats list still reads account 1.
Fix options: tg accounts switch also writes activeAccount when the config has one, or the config value is applied only when it changes. Done when an e2e test shows that after tg accounts switch --id 2 the next tg chats list reads account 2 with and without activeAccount in the config, and docs/configuration.md says which wins.
Activity
fix: keep tg accounts switch when config.json sets activeAccount
fix: keep tg accounts switch when config.json sets activeAccount
docs: add the changelog entries for the 0.4.0 bug fixes
fix(auth): write the logged-in account to activeAccount when config.j…
test(cli-core): keep one owner per CLI, account and output contract