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:
@@ -148,12 +148,14 @@ def run_forward():
|
||||
print("Verific emailuri necitite...")
|
||||
emails = fetch_unread_emails()
|
||||
|
||||
owner_jid = get_owner_jid()
|
||||
|
||||
if not emails:
|
||||
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 em in emails:
|
||||
subject = em['subject']
|
||||
print(f"Trimit: {subject}")
|
||||
|
||||
Reference in New Issue
Block a user