From 5c44d4d548e496cb27854ad1662fdb92ce468b4f Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 16 Jul 2020 23:29:59 +0000 Subject: [PATCH] --- server/AyaNova/biz/NotifyEventProcessor.cs | 1 + server/AyaNova/generator/CoreJobNotify.cs | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/server/AyaNova/biz/NotifyEventProcessor.cs b/server/AyaNova/biz/NotifyEventProcessor.cs index df2c552f..88906a45 100644 --- a/server/AyaNova/biz/NotifyEventProcessor.cs +++ b/server/AyaNova/biz/NotifyEventProcessor.cs @@ -61,6 +61,7 @@ namespace AyaNova.Biz //this will likely be a development error, not a production error so no need to log etc throw new System.ArgumentException("NotifyEventProcessor:AddGeneralNotifyEvent: DefaultNotification requires a user id but none was specified"); } + //create in app NotifyEvent n=new NotifyEvent(){EventType=eventType,UserId=userId, Message=message} return; diff --git a/server/AyaNova/generator/CoreJobNotify.cs b/server/AyaNova/generator/CoreJobNotify.cs index b9d1342d..0e487b1b 100644 --- a/server/AyaNova/generator/CoreJobNotify.cs +++ b/server/AyaNova/generator/CoreJobNotify.cs @@ -46,6 +46,15 @@ namespace AyaNova.Biz { //select all jobs with no deliver date or deliver date no longer in future + //IMPLEMENTATION NOTES: This code + // finds the events in NotifyEvent + // check subscription to determine if the age related ones are deliverable now + // check subscriptions for each delivery type, i.e. there might be both smtp and inapp separately for the same event so it needs to know that and deliver accordingly + // remove the notify event after it's processed + + + + //Older notes: //### PLAN if it's an smtp delivery that fails and it's to someone who can be delivered in app then it should send an inapp notification of //delivery failure and still delete the smtp delivery //If it's not possible to notify the person via in app of the failed smtp then perhaps it notifies OPS personnel and biz admin personnel