This commit is contained in:
@@ -41,7 +41,7 @@ namespace AyaNova.Biz
|
||||
//This handles general notification events not requiring a decision or tied to an object that are basically just a immediate message to the user
|
||||
//e.g. ops problems, DefaultNotification, NotifyHealthCheck etc
|
||||
//optional user id to send directly to them
|
||||
internal static async Task AddGeneralNotifyEvent(NotifyEventType eventType, string message, long userId = 0)
|
||||
internal static async Task AddGeneralNotifyEvent(NotifyEventType eventType, string message, Exception except = null, long userId = 0)
|
||||
{
|
||||
log.LogTrace($"AddGeneralNotifyEvent processing: [type:{eventType}, userId:{userId}, message:{message}]");
|
||||
#if (DEBUG)
|
||||
@@ -86,6 +86,11 @@ namespace AyaNova.Biz
|
||||
|
||||
//check subscriptions for event and send accordingly to each user
|
||||
var subs = await ct.NotifySubscription.Where(z => z.EventType == eventType).ToListAsync();
|
||||
|
||||
//append exception message if not null
|
||||
if (except != null)
|
||||
message += $"\nException error: {ExceptionUtil.ExtractAllExceptionMessages(except)}";
|
||||
|
||||
foreach (var sub in subs)
|
||||
{
|
||||
//note flag ~SERVER~ means to client to substitute "Server" translation key text instead
|
||||
|
||||
Reference in New Issue
Block a user