Fixed issues with TTS voice changes. Added proper handling for slave clients. Fixed several stores. Fixed database saving to safely save foreign keys.
This commit is contained in:
@@ -54,6 +54,9 @@ namespace HermesSocketServer.Store
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(value.Scope, nameof(value.Scope));
|
||||
ArgumentNullException.ThrowIfNull(value.ExpiresAt, nameof(value.ExpiresAt));
|
||||
ArgumentNullException.ThrowIfNull(value.Default, nameof(value.Default));
|
||||
|
||||
if (value.Name.Length > 36)
|
||||
throw new ArgumentException("Action name cannot be longer than 36 characters.");
|
||||
}
|
||||
|
||||
protected override void OnInitialModify(string key, Connection oldValue, Connection newValue)
|
||||
@@ -70,6 +73,8 @@ namespace HermesSocketServer.Store
|
||||
ArgumentNullException.ThrowIfNull(newValue.Default, nameof(newValue.Default));
|
||||
ArgumentOutOfRangeException.ThrowIfNotEqual(oldValue.UserId, newValue.UserId, nameof(oldValue.UserId));
|
||||
ArgumentOutOfRangeException.ThrowIfNotEqual(oldValue.Name, newValue.Name, nameof(oldValue.Name));
|
||||
ArgumentOutOfRangeException.ThrowIfNotEqual(oldValue.Type, newValue.Type, nameof(oldValue.Type));
|
||||
ArgumentOutOfRangeException.ThrowIfNotEqual(oldValue.ClientId, newValue.ClientId, nameof(oldValue.ClientId));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user