This website requires JavaScript.
Explore
Help
Sign In
earthjasonlin
/
ai-mail-bot
Watch
1
Star
0
Fork
0
You've already forked ai-mail-bot
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
Files
c6180834bc4e60b25e0af0d1162526415d8a7b6a
ai-mail-bot
/
main.py
Zichao Lin
f2b3793d4c
feat: multi-user support - Config format: JSON with bot_token (global), users array - Each user has chat_id, AI config, email_accounts - Each email account has separate IMAP/SMTP with ssl/starttls - Config module: new dataclasses (UserConfig, ImapConfig, SmtpConfig) - find_user_by_chat_id() for callback dispatch - Main: email poller iterates all users, queues carry user object - Summarizer: accepts UserConfig, uses user-specific AI and chat_id - TG bot: all functions use bot_token string instead of TelegramConfig - Callback/message handlers look up user by chat_id - AI regen/hint threads use find_user_by_chat_id for AI config - Config example: config.example.json - Tests: 3/3 passing
2026-07-17 22:05:59 +08:00
6.8 KiB
Raw
Blame
History
View Raw
Reference in New Issue
View Git Blame
Copy Permalink