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:
@@ -48,6 +48,8 @@ namespace HermesSocketServer.Store
|
||||
ArgumentNullException.ThrowIfNull(value.GroupId, nameof(value.GroupId));
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(value.Path, nameof(value.Path));
|
||||
|
||||
if (value.Path.Length > 100)
|
||||
throw new ArgumentException("The path cannot be longer than 100 characters.");
|
||||
if (_groups.Get(value.GroupId.ToString()) == null)
|
||||
throw new ArgumentException("The group id does not exist.");
|
||||
}
|
||||
@@ -60,6 +62,9 @@ namespace HermesSocketServer.Store
|
||||
ArgumentException.ThrowIfNullOrWhiteSpace(newValue.Path, nameof(newValue.Path));
|
||||
ArgumentOutOfRangeException.ThrowIfNotEqual(oldValue.UserId, newValue.UserId, nameof(oldValue.UserId));
|
||||
ArgumentOutOfRangeException.ThrowIfNotEqual(oldValue.GroupId, newValue.GroupId, nameof(oldValue.GroupId));
|
||||
|
||||
if (oldValue.Path != newValue.Path && newValue.Path.Length > 100)
|
||||
throw new ArgumentException("The path cannot be longer than 100 characters.");
|
||||
}
|
||||
|
||||
protected override void OnPostRemove(string key, GroupPermission value)
|
||||
|
||||
Reference in New Issue
Block a user