chore: auto-commit from dashboard
This commit is contained in:
@@ -137,9 +137,16 @@ def _email_check() -> str:
|
||||
if count == 0:
|
||||
return "Inbox curat."
|
||||
emails = data.get("emails", [])
|
||||
subjects = [e.get("subject", "?") for e in emails[:5]]
|
||||
subject_list = ", ".join(subjects)
|
||||
return f"{count} necitite: {subject_list}"
|
||||
parts = [f"{count} necitite:\n"]
|
||||
for e in emails[:5]:
|
||||
sender = e.get("from", "?")
|
||||
subject = e.get("subject", "?")
|
||||
body = e.get("body_preview", "").strip()
|
||||
parts.append(f"**{subject}**\nDe la: {sender}")
|
||||
if body:
|
||||
parts.append(body[:500])
|
||||
parts.append("")
|
||||
return "\n".join(parts).strip()
|
||||
except json.JSONDecodeError:
|
||||
return proc.stdout.strip()[:300] if proc.stdout else "Email check: no output."
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user