chore: auto-commit from dashboard

This commit is contained in:
MoltBot Service
2026-02-15 23:23:29 +00:00
parent 8ce7ea3bd6
commit fd9d962ad2
3 changed files with 408 additions and 26 deletions

View File

@@ -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: