fix(email): send WhatsApp notification when no new emails found
Previously digest and forward commands silently exited when inbox was empty, leaving the user with no feedback after the initial "processing..." confirmation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -98,12 +98,14 @@ def run_digest():
|
||||
print("📬 Verific emailuri necitite...")
|
||||
saved = save_unread_emails()
|
||||
|
||||
owner_jid = get_owner_jid()
|
||||
|
||||
if not saved:
|
||||
print("Niciun email nou de procesat.")
|
||||
if not DRY_RUN:
|
||||
send_whatsapp(owner_jid, "📭 Nu sunt emailuri noi.")
|
||||
return
|
||||
|
||||
owner_jid = get_owner_jid()
|
||||
|
||||
for result in saved:
|
||||
if not result.get("ok"):
|
||||
print(f"⚠️ Sărit: {result.get('error')}")
|
||||
|
||||
Reference in New Issue
Block a user