diff --git a/server/biz/KeyFactory.cs b/server/biz/KeyFactory.cs index e1dbd5d..c7cd5b9 100644 --- a/server/biz/KeyFactory.cs +++ b/server/biz/KeyFactory.cs @@ -339,7 +339,10 @@ namespace Sockeye.Biz w.WritePropertyName("InstallableUntil"); - w.WriteValue(l.MaintenanceExpire); + //There is really no need for keys to not be installable now that that they are fetched automatically + //this was a holdover from the old manual paste a key in entry system to prevent piracy of using the key repeatedly, now that it's fetched though + //this is not necessary so adding 2 years just avoids an issue with the user not fetching right away or a partially expired key + w.WriteValue(l.MaintenanceExpire.AddYears(2)); w.WritePropertyName("TotalScheduleableUsers"); w.WriteValue(l.Users.ToString());//Needs to be a string to match rockfish format diff --git a/server/biz/LicenseBiz.cs b/server/biz/LicenseBiz.cs index 1fa6ac1..ad1bfea 100644 --- a/server/biz/LicenseBiz.cs +++ b/server/biz/LicenseBiz.cs @@ -41,7 +41,7 @@ namespace Sockeye.Biz //////////////////////////////////////////////////////////////////////////////////////////////// //CREATE // - internal async Task CreateAsync(License newObject, bool importedWithKeyDoNotGenerate = false) + internal async Task CreateAsync(License newObject) { //client can send a non expiring license key but internally it MUST have a date if it's RAVEN so the //raven default for non expiring keys is this @@ -54,11 +54,9 @@ namespace Sockeye.Biz return null; else { - - if (!importedWithKeyDoNotGenerate && newObject.Active)//do not generate is used for initial import only from rockfish, could be removed after the initial import + if (newObject.Active) { await GenerateKey(newObject); - } if (HasErrors) return null; newObject.Tags = TagBiz.NormalizeTags(newObject.Tags); @@ -75,6 +73,10 @@ namespace Sockeye.Biz && newObject.RegTo != RavenKeyFactory.REVOKED_TOKEN) {//this means it should notify customer / trialer immediately await NotifyEndUserKeyIsAvailableAsync(newObject); + if (newObject.NotificationSent == true) + { + await ct.SaveChangesAsync(); + } } return newObject; } @@ -149,6 +151,10 @@ namespace Sockeye.Biz && putObject.RegTo != RavenKeyFactory.REVOKED_TOKEN) {//this means it should notify customer / trialer immediately await NotifyEndUserKeyIsAvailableAsync(putObject); + if (putObject.NotificationSent == true) + { + await ct.SaveChangesAsync(); + } } return putObject; } @@ -249,6 +255,7 @@ MaximumDataGB: 20 { await m.SendEmailAsync(notifyDirectSMTP.ToAddress, notifyDirectSMTP.Subject, notifyDirectSMTP.TextBody, ServerGlobalOpsSettingsCache.Notify, null, null, null); await EventLogProcessor.LogEventToDatabaseAsync(new Event(1, notifyDirectSMTP.ObjectId, notifyDirectSMTP.SockType, SockEvent.DirectSMTP, $"\"{notifyDirectSMTP.Subject}\"->{notifyDirectSMTP.ToAddress}"), ct); + l.NotificationSent = true; } catch (Exception ex) { diff --git a/server/sockeye.csproj b/server/sockeye.csproj index 03f6647..18b78e7 100644 --- a/server/sockeye.csproj +++ b/server/sockeye.csproj @@ -4,8 +4,8 @@ true - 8.0.5 - 8.0.5.0 + 8.0.6 + 8.0.6.0 sockeye.ico bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml 1591 diff --git a/server/util/SockeyeVersion.cs b/server/util/SockeyeVersion.cs index 81028cc..7fa8988 100644 --- a/server/util/SockeyeVersion.cs +++ b/server/util/SockeyeVersion.cs @@ -5,7 +5,7 @@ namespace Sockeye.Util /// internal static class SockeyeVersion { - public const string VersionString = "8.0.5"; + public const string VersionString = "8.0.6"; public const string FullNameAndVersion = "Sockeye server " + VersionString; public const string CurrentApiVersion="v8"; }//eoc