email: store emails.db per account under email_accounts/<account>/
Reorganizes email storage: the DB moves from DATA_PATH/<user>/emails.db to DATA_PATH/<user>/email_accounts/<accountEmail>/emails.db, with a shared email_accounts/attachment_cache/ (was Gmail/emails/attachments). openEmailDb now takes (owner, account); a new openUserEmailDb(owner, userId) resolves the user's configured account (first enabled) for read paths. Threads the account through email.ts, accounts, resync, queue sync, channel handlers, and the email_db MCP tool path. Drops the dead getUserEmailDir helper. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -27,7 +27,8 @@ if (targetEmail) {
|
||||
function migrate(userEmail: string): void {
|
||||
console.log(`Migrating ${userEmail}...`);
|
||||
const emailDir = join(DATA_PATH, userEmail, 'Gmail', 'emails');
|
||||
const db = openEmailDb(userEmail);
|
||||
// Obsolete one-off migration (old .eml-file store → SQLite); kept only to compile.
|
||||
const db = openEmailDb(userEmail, userEmail);
|
||||
|
||||
let filenames: string[];
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user