From 6fb52975bfc2b5d58832dad22609a85b986a60fe Mon Sep 17 00:00:00 2001 From: colin Date: Wed, 15 Oct 2025 14:17:09 +0800 Subject: [PATCH] fix(notifications): fix email markdown notifier --- .../Emailing/EmailingNotificationPublishProvider.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Emailing/LINGYUN/Abp/Notifications/Emailing/EmailingNotificationPublishProvider.cs b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Emailing/LINGYUN/Abp/Notifications/Emailing/EmailingNotificationPublishProvider.cs index 01ba8ae8f..05b34ce5d 100644 --- a/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Emailing/LINGYUN/Abp/Notifications/Emailing/EmailingNotificationPublishProvider.cs +++ b/aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Emailing/LINGYUN/Abp/Notifications/Emailing/EmailingNotificationPublishProvider.cs @@ -1,4 +1,5 @@ using LINGYUN.Abp.Identity; +using Markdig; using Microsoft.Extensions.Logging; using System; using System.Collections.Generic; @@ -51,6 +52,12 @@ public class EmailingNotificationPublishProvider : NotificationPublishProvider } var notificationData = await NotificationDataSerializer.ToStandard(notification.Data); + // markdown进行处理 + if (notification.ContentType == NotificationContentType.Markdown) + { + notificationData.Message = Markdown.ToHtml(notificationData.Message); + } + await EmailSender.SendAsync(emailAddress, notificationData.Title, notificationData.Message); } }