Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
2da0096453
only send email when a note actually has content 2026-02-09 14:33:22 +01:00

View file

@ -215,6 +215,8 @@ class HedgedocExpire:
with db.prepare('DELETE FROM "Notes" WHERE "id" = $1') as delete_statement: with db.prepare('DELETE FROM "Notes" WHERE "id" = $1') as delete_statement:
for note in self.notes_to_be_expired(db): for note in self.notes_to_be_expired(db):
try: try:
if len(note["content"]) > 0:
note_age = datetime.now(timezone.utc) - datetime.fromisoformat(note['updatedAt']) note_age = datetime.now(timezone.utc) - datetime.fromisoformat(note['updatedAt'])
msg = MIMEMultipart() msg = MIMEMultipart()
msg['From'] = self.email_sender.mail_from msg['From'] = self.email_sender.mail_from