Commit graph

4194 commits

Author SHA1 Message Date
8d3c28e441 Fix SMTP: use starttls_relay for port 587, relay for 465 2026-04-06 11:00:23 -03:00
15d9e3c142 fix(deploy): Ignore error if /opt/gbo/bin/botserver doesn't exist on first deploy
All checks were successful
BotServer CI/CD / build (push) Successful in 5m7s
2026-04-05 19:38:54 -03:00
86bb4cad8e fix(botserver): Handle TOOL_EXEC message type for direct tool execution without KB/LLM
Some checks failed
BotServer CI/CD / build (push) Failing after 5m40s
2026-04-05 19:11:04 -03:00
3684c862c6 fix drive: add missing diesel imports (QueryableByName, RunQueryDsl)
Some checks failed
BotServer CI/CD / build (push) Failing after 2m29s
2026-04-05 13:19:22 -03:00
b5d5c576a4 Fix unused imports
Some checks failed
BotServer CI/CD / build (push) Failing after 5m42s
2026-04-05 12:34:33 -03:00
f6869e6b5c Fix diesel join queries across schemas and FileItem missing fields
Some checks failed
BotServer CI/CD / build (push) Failing after 10m1s
2026-04-05 12:06:35 -03:00
508a3ed011 Update directory module: Zitadel v4.13.1 integration
Some checks failed
BotServer CI/CD / build (push) Failing after 6m43s
2026-04-05 11:32:35 -03:00
155d465b14 Update botserver: Refactor groups module, add Knowledge Base group association logic, and implement Drive tags for KB access.
Some checks failed
BotServer CI/CD / build (push) Failing after 5m53s
2026-04-05 09:11:54 -03:00
552f37a41c fix(secrets): Remove unused sync caching functions to fix CI clippy warnings
All checks were successful
BotServer CI/CD / build (push) Successful in 12m19s
2026-04-05 07:52:41 -03:00
24e0b23030 fix(secrets): Use async Vault client to properly load TLS CA and fix cache expiration bug
Some checks failed
BotServer CI/CD / build (push) Has been cancelled
2026-04-05 07:48:44 -03:00
3502c61faf Update secrets and email types
All checks were successful
BotServer CI/CD / build (push) Successful in 10m52s
- Refactor secrets module structure
- Remove unused type in email types
- Improve error handling in secrets

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-05 06:27:34 -03:00
0ac8178baa fix: use std::sync::RwLock for cache to support sync methods
Some checks failed
BotServer CI/CD / build (push) Failing after 6m3s
2026-04-05 01:19:45 -03:00
fd7f48c423 fix: merge duplicate [dependencies] sections in Cargo.toml
Some checks failed
BotServer CI/CD / build (push) Failing after 6m31s
2026-04-05 01:10:53 -03:00
8c908ed2f0 fix: fix Cargo.toml section order
Some checks failed
BotServer CI/CD / build (push) Failing after 2s
2026-04-05 01:08:59 -03:00
60dc273681 fix: use CachedSecret struct instead of tuples in sync methods
Some checks failed
BotServer CI/CD / build (push) Failing after 2s
2026-04-05 01:07:42 -03:00
9383cf0e3a fix: move ureq to dependencies section
Some checks failed
BotServer CI/CD / build (push) Failing after 2s
2026-04-05 01:04:05 -03:00
985ba63e38 fix: use env vars for blocking Vault HTTP call
Some checks failed
BotServer CI/CD / build (push) Failing after 5m54s
2026-04-05 00:56:07 -03:00
f1d0a985e4 fix: remove duplicate code block from secrets mod
Some checks failed
BotServer CI/CD / build (push) Failing after 5m52s
2026-04-05 00:48:13 -03:00
697210a37e fix: remove duplicate code block in secrets mod
Some checks failed
BotServer CI/CD / build (push) Failing after 12s
2026-04-05 00:44:20 -03:00
10e4f4ac9b fix: move ureq to dependencies section
Some checks failed
BotServer CI/CD / build (push) Failing after 22s
2026-04-05 00:41:28 -03:00
c90c5dc039 fix: use blocking HTTP for Vault email config to avoid runtime nesting
Some checks failed
BotServer CI/CD / build (push) Failing after 2s
2026-04-05 00:37:33 -03:00
7a5f858d86 fix: remove catch_unwind, add error logging
All checks were successful
BotServer CI/CD / build (push) Successful in 4m22s
2026-04-05 00:26:44 -03:00
b277b032b0 fix: catch panics in send_mail thread
Some checks failed
BotServer CI/CD / build (push) Failing after 1m16s
2026-04-05 00:22:26 -03:00
eba075bb9d fix: use existing tokio Handle instead of spawning new runtime for email config
All checks were successful
BotServer CI/CD / build (push) Successful in 4m32s
2026-04-05 00:13:10 -03:00
645a7936c5 fix: use shared secrets manager instead of creating new Vault client
All checks were successful
BotServer CI/CD / build (push) Successful in 4m12s
2026-04-04 23:58:17 -03:00
597a962fbf fix: use multi-threaded runtime for email config lookup to avoid blocking
All checks were successful
BotServer CI/CD / build (push) Successful in 4m23s
2026-04-04 23:48:00 -03:00
30bb764876 fix: add 5s timeout to email config lookup to prevent hanging
All checks were successful
BotServer CI/CD / build (push) Successful in 4m26s
2026-04-04 23:35:20 -03:00
4ae695764e fix: clone msg_id before move
All checks were successful
BotServer CI/CD / build (push) Successful in 4m15s
2026-04-04 23:15:10 -03:00
58f8451981 fix: add ConfigManager import, fix ContentType import
Some checks failed
BotServer CI/CD / build (push) Failing after 1m11s
2026-04-04 23:11:35 -03:00
06aee7c9ef fix: filter closure type inference
Some checks failed
BotServer CI/CD / build (push) Failing after 5m23s
2026-04-04 23:01:17 -03:00
cb8a3fa75a fix: remove unused get_smtp_config, add missing imports
Some checks failed
BotServer CI/CD / build (push) Failing after 5m31s
2026-04-04 22:52:32 -03:00
8fcd57bc78 fix: type annotations in marketing/email.rs
Some checks failed
BotServer CI/CD / build (push) Failing after 5m41s
2026-04-04 22:39:08 -03:00
71b39a8cdd fix: add AppState import and type annotation in marketing/email.rs
Some checks failed
BotServer CI/CD / build (push) Failing after 5m43s
2026-04-04 22:27:08 -03:00
f5082acac0 fix: remove leftover code in send_campaign_email
Some checks failed
BotServer CI/CD / build (push) Failing after 5m46s
2026-04-04 22:18:49 -03:00
1dc11c9b4e refactor: unify email sending to use EmailService + Vault, remove Gmail hardcoded defaults
Some checks failed
BotServer CI/CD / build (push) Failing after 17s
- Replace gmail defaults with Vault-backed get_email_config_for_bot_sync
- send_campaign_email now delegates to EmailService::send_email
- Remove hardcoded smtp.gmail.com, imap.gmail.com, noreply@generalbots.com
- All SMTP config flows through Vault: bot → default bot → system
- Remove unused lettre imports from marketing/email.rs
2026-04-04 22:16:20 -03:00
b131c7e311 fix: use builder_dangerous with credentials for port 25 (like Roundcube does)
All checks were successful
BotServer CI/CD / build (push) Successful in 5m1s
2026-04-04 21:46:06 -03:00
b8bf4ed5bb fix: remove private ClientId usage, use builder_dangerous for port 25
All checks were successful
BotServer CI/CD / build (push) Successful in 2m51s
2026-04-04 20:58:45 -03:00
a3226162a4 fix: set hello_name to mail.pragmatismo.com.br for Stalwart EHLO
Some checks failed
BotServer CI/CD / build (push) Failing after 5m57s
2026-04-04 20:34:33 -03:00
f8e3b34a8a fix: use builder_dangerous for port 25 (local Stalwart), starttls_relay for 465/587
All checks were successful
BotServer CI/CD / build (push) Successful in 4m53s
2026-04-04 20:25:59 -03:00
61ae0cac82 fix: log EmailService::send_email errors instead of silently discarding
All checks were successful
BotServer CI/CD / build (push) Successful in 4m26s
2026-04-04 19:03:19 -03:00
dde6ac236e fix: check for non-empty smtp_from in email fallback chain
All checks were successful
BotServer CI/CD / build (push) Successful in 4m29s
2026-04-04 18:45:47 -03:00
3f3ecc5320 fix: make email tracking and draft saving non-fatal for bots without those tables
All checks were successful
BotServer CI/CD / build (push) Successful in 4m43s
2026-04-04 18:13:46 -03:00
01db253900 fix: add log::info import, fix ContentType parse, remove unused RedisClient import
All checks were successful
BotServer CI/CD / build (push) Successful in 4m38s
2026-04-04 17:49:40 -03:00
5cfd93b050 fix: remove dead code leftover in email/types.rs
Some checks failed
BotServer CI/CD / build (push) Failing after 5m38s
2026-04-04 17:39:12 -03:00
a3ad927a21 fix: remove mime crate dependency, use lettre ContentType for mime types
Some checks failed
BotServer CI/CD / build (push) Failing after 14s
2026-04-04 17:29:45 -03:00
45eb8357cb feat: implement real email sending via lettre + Vault credentials
Some checks failed
BotServer CI/CD / build (push) Failing after 8m6s
- Replace EmailService::send_email stub with full lettre SMTP implementation
- Vault resolution chain: bot-specific → default bot → system fallback
- Seed Vault prod with default email config (contato@pragmatismo.com.br)
- Update all call sites to pass bot_id for Vault lookup
- Support attachments via lettre MultiPart/Attachment API
- Remove unused imports and dead code
2026-04-04 17:16:50 -03:00
0de4565e5a refactor: Generalize WhatsAppAdapter::new to accept &AppState
All checks were successful
BotServer CI/CD / build (push) Successful in 4m55s
- Simplify constructor from (pool, bot_id, cache) to (&state, bot_id)
- Adapter now extracts conn and cache from AppState internally
- Updates 15 call sites across 6 files
- Removes redundant parameter plumbing at every call site
2026-04-04 15:46:10 -03:00
62e9a64340 fix: Remove duplicate code in table_migration.rs
All checks were successful
BotServer CI/CD / build (push) Successful in 4m27s
- Removed duplicate DbColumn struct, PROTECTED_COLUMNS const, and sync_table_schema fn
- File now has single clean implementation with column drop protection
2026-04-04 11:11:22 -03:00
d785d255c6 feat: Add column drop protection in table schema sync
Some checks failed
BotServer CI/CD / build (push) Failing after 2m30s
- Add columns_dropped counter to MigrationResult
- Add PROTECTED_COLUMNS list (id, bot_id, org_id, user_id, created_at, etc.)
- Detect orphaned columns (in DB but not in tables.bas) and drop them
- Protected columns are never dropped automatically
- Uses DROP COLUMN IF EXISTS for safety
- Logs warnings for orphaned columns before dropping
2026-04-04 11:02:47 -03:00
44669c3825 fix: Fix resolve_export_path typo and remove unused PathBuf imports
All checks were successful
BotServer CI/CD / build (push) Successful in 4m28s
2026-04-04 10:23:42 -03:00