This commit is contained in:
2020-12-22 19:46:46 +00:00
parent 290b39be15
commit 18df3ab55e
4 changed files with 134 additions and 92 deletions

View File

@@ -130,6 +130,9 @@ namespace AyaNova.Biz
//when to time delay deliver formula:If sub.agevalue!= timespan.zero then deliver on =
//NotifyEvent "EventDate"+NotifySubscription.AgeValue timespan - NotifySubscription AdvanceNotice timespan > utcNow
//Is it time delayed?
//(NOTE: some direct notifications in app e.g. overdue review will have a future date set as a deadman switch to deliver after unless completed before then
//their EventDate will be that future date, however regular in app notifications will go through here too but their evendate will be the moment they are created so should still
//deliver immediately-ish)
if (notifyevent.NotifySubscription.AgeValue != TimeSpan.Zero)
{
var deliverAfter = notifyevent.EventDate + notifyevent.NotifySubscription.AgeValue - notifyevent.NotifySubscription.AdvanceNotice;
@@ -147,6 +150,9 @@ namespace AyaNova.Biz
}
else
{
//COULD BE TIME DELAYED BUT WITHOUT AGE, i.e. EventDate takes precedence?
//NORMAL IMMEDIATE DELIVERY EVENT
if (notifyevent.NotifySubscription.DeliveryMethod == NotifyDeliveryMethod.App)
{