Browse Source
Merge pull request #1345 from colinin/fix-email-markdown-notification
fix(notifications): fix email markdown notifier
pull/1351/head
yx lin
5 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
7 additions and
0 deletions
-
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); |
|
|
|
} |
|
|
|
} |
|
|
|
|