accounting_automation: Gmail читается от имени agents@ (участник группы invoice@), поиск по письмам на группу
All checks were successful
ci / test (push) Successful in 41s
ci / deploy (push) Successful in 2m44s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-23 16:30:08 +03:00
parent 7d4098f03a
commit f636836f47
2 changed files with 5 additions and 2 deletions

View File

@@ -64,6 +64,7 @@ const app = buildApi({
const mail = new GmailClient({
auth,
user: s.google.gmailUser,
query: s.google.gmailQuery,
processedIds: async (ids) => {
const { rows } = await pool.query("select message_id from acc_mail_processed where message_id = any($1) and result <> 'error'", [ids]);
return new Set(rows.map((r) => r.message_id as string));