This commit is contained in:
2021-06-10 14:03:49 +00:00
parent fe4ce3f4ed
commit 5a170bc7ab

View File

@@ -1085,9 +1085,7 @@ namespace AyaNova.Biz
//not for inactive users //not for inactive users
if (!await UserBiz.UserIsActive(sub.UserId)) continue; if (!await UserBiz.UserIsActive(sub.UserId)) continue;
//Tag match? (will be true if no sub tags so always safe to call this) //No tag match for this one
if (NotifyEventHelper.ObjectHasAllSubscriptionTags(proposedObj.Tags, sub.Tags))
{
NotifyEvent n = new NotifyEvent() NotifyEvent n = new NotifyEvent()
{ {
@@ -1102,7 +1100,7 @@ namespace AyaNova.Biz
await ct.NotifyEvent.AddAsync(n); await ct.NotifyEvent.AddAsync(n);
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]"); log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
await ct.SaveChangesAsync(); await ct.SaveChangesAsync();
}
} }
}//CustomerServiceImminent }//CustomerServiceImminent
@@ -1125,9 +1123,7 @@ namespace AyaNova.Biz
//not for inactive users //not for inactive users
if (!await UserBiz.UserIsActive(sub.UserId)) continue; if (!await UserBiz.UserIsActive(sub.UserId)) continue;
//Tag match? (will be true if no sub tags so always safe to call this) //No tag match for this one
if (NotifyEventHelper.ObjectHasAllSubscriptionTags(proposedObj.Tags, sub.Tags))
{
NotifyEvent n = new NotifyEvent() NotifyEvent n = new NotifyEvent()
{ {
EventType = NotifyEventType.CustomerServiceImminent, EventType = NotifyEventType.CustomerServiceImminent,
@@ -1141,7 +1137,7 @@ namespace AyaNova.Biz
await ct.NotifyEvent.AddAsync(n); await ct.NotifyEvent.AddAsync(n);
log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]"); log.LogDebug($"Adding NotifyEvent: [{n.ToString()}]");
await ct.SaveChangesAsync(); await ct.SaveChangesAsync();
}
} }
} }
} }