Browse Source

fix(notifications): fix email markdown notifier

pull/1345/head
colin 4 months ago
parent
commit
6fb52975bf
  1. 7
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Emailing/LINGYUN/Abp/Notifications/Emailing/EmailingNotificationPublishProvider.cs

7
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);
}
}

Loading…
Cancel
Save