This commit is contained in:
2021-06-09 19:53:24 +00:00
parent d9e1766210
commit deebb5dc25
4 changed files with 48 additions and 11 deletions

View File

@@ -31,13 +31,15 @@ namespace AyaNova.Biz
//NOTE: agevalue and advanced notice settings here will ensure that direct in app notifications with a future delivery date ("deadman" switch deliveries) set in their
//notifyevent.eventdate will deliver on that date and not immediately to support all the things that are direct built in notifications for future dates
//such as for an overdue Review which doesn't have or need it's own notifyeventtype and subscription independently
//NEW NOTE: above makes not sense, I'm setting these back to timespan zero
defaultsub = new NotifySubscription()
{
UserId = userId,
EventType = NotifyEventType.GeneralNotification,
DeliveryMethod = NotifyDeliveryMethod.App,
AgeValue = new TimeSpan(0, 0, 1),
AdvanceNotice = new TimeSpan(0, 0, 1)
AgeValue = TimeSpan.Zero,//new TimeSpan(0, 0, 1),
AdvanceNotice = TimeSpan.Zero//new TimeSpan(0, 0, 1)
};
await ct.NotifySubscription.AddAsync(defaultsub);
await ct.SaveChangesAsync();
@@ -339,7 +341,7 @@ namespace AyaNova.Biz
var UserName = await ct.User.AsNoTracking().Where(z => z.Id == userId).Select(z => z.Name).FirstOrDefaultAsync();
//if they don't have a regular inapp subscription create one now
await EnsureDefaultInAppUserNotificationSubscriptionExists(userId, ct);
await EnsureDefaultInAppUserNotificationSubscriptionExists(userId, ct);
if (string.IsNullOrWhiteSpace(name))
name = UserName;