This commit is contained in:
@@ -298,6 +298,10 @@ namespace AyaNova.Biz
|
||||
//
|
||||
|
||||
internal static async Task AddGeneralNotifyEvent(NotifyEventType eventType, string message, string name, Exception except = null, long userId = 0)
|
||||
{
|
||||
await AddGeneralNotifyEvent(AyaType.NoType, 0, eventType, message, name, except, userId);
|
||||
}
|
||||
internal static async Task AddGeneralNotifyEvent(AyaType atype, long objectid, NotifyEventType eventType, string message, string name, Exception except = null, long userId = 0)
|
||||
{
|
||||
|
||||
//This handles general notification events not requiring a decision or tied to an object that are basically just a immediate message to the user
|
||||
@@ -350,7 +354,7 @@ namespace AyaNova.Biz
|
||||
var gensubs = await ct.NotifySubscription.Where(z => z.EventType == NotifyEventType.GeneralNotification && z.UserId == userId).ToListAsync();
|
||||
foreach (var sub in gensubs)
|
||||
{
|
||||
NotifyEvent n = new NotifyEvent() { EventType = eventType, UserId = userId, Message = message, NotifySubscriptionId = sub.Id, Name = name };
|
||||
NotifyEvent n = new NotifyEvent() { EventType = eventType, UserId = userId, Message = message, NotifySubscriptionId = sub.Id, Name = name, AyaType = atype, ObjectId = objectid };
|
||||
await ct.NotifyEvent.AddAsync(n);
|
||||
}
|
||||
if (gensubs.Count > 0)
|
||||
@@ -371,7 +375,7 @@ namespace AyaNova.Biz
|
||||
//not for inactive users
|
||||
if (!await UserBiz.UserIsActive(sub.UserId)) continue;
|
||||
//note flag ~SERVER~ means to client to substitute "Server" translation key text instead
|
||||
NotifyEvent n = new NotifyEvent() { EventType = eventType, UserId = sub.UserId, Message = message, NotifySubscriptionId = sub.Id, Name = "~SERVER~" };
|
||||
NotifyEvent n = new NotifyEvent() { EventType = eventType, UserId = sub.UserId, Message = message, NotifySubscriptionId = sub.Id, Name = "~SERVER~", AyaType = atype, ObjectId = objectid };
|
||||
await ct.NotifyEvent.AddAsync(n);
|
||||
}
|
||||
if (subs.Count > 0)
|
||||
|
||||
Reference in New Issue
Block a user