email: align MCP email_db account with the API (first enabled)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -39,9 +39,10 @@ const homeDir =
|
||||
dbUser.role === 'Super Admin' ? (process.env.HOME_DIR ?? homedir()) : join(DATA_PATH, email, 'home');
|
||||
const globalToolsDir = join(DATA_PATH, 'tools');
|
||||
|
||||
// The email_db MCP tool reads one account's SQLite store; use the user's first configured account.
|
||||
// The email_db MCP tool reads one account's SQLite store; match the API's choice (first enabled).
|
||||
const emailAccounts = await getEmailAccounts(dbUser.id);
|
||||
const emailDbRel = join('email_accounts', emailAccounts[0]?.email ?? 'none', 'emails.db');
|
||||
const emailAccount = emailAccounts.find((a) => a.enabled) ?? emailAccounts[0];
|
||||
const emailDbRel = join('email_accounts', emailAccount?.email ?? 'none', 'emails.db');
|
||||
const userToolsDir = join(DATA_PATH, email, 'tools');
|
||||
|
||||
// ── Path setup ──
|
||||
|
||||
Reference in New Issue
Block a user