From 7f4c7907be1e118539223c8ba00bc4aa7681032e Mon Sep 17 00:00:00 2001 From: jokob-sk Date: Fri, 10 Jul 2026 12:06:45 +1000 Subject: [PATCH] BE: better notification preview --- server/models/notification_instance.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server/models/notification_instance.py b/server/models/notification_instance.py index 007e0656..2e09c320 100755 --- a/server/models/notification_instance.py +++ b/server/models/notification_instance.py @@ -146,9 +146,14 @@ class NotificationInstance: mail_html, conf.REPORT_DASHBOARD_URL + "/deviceDetails.php?mac=" ) - # Add Preheaders for preview after mac links created + # Add preheader for inbox preview after all links have been generated. + # Invisible padding prevents email clients from showing the start of the email body. + preheader = " • ".join(preheaders) + padding = " " * 40 + "​" * 40 + mail_html = mail_html.replace( - "PREHEADER", " • ".join(preheaders) + "PREHEADER", + preheader + padding, ) final_html = indent(