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:
Tom
2025-03-06 16:11:36 +00:00
parent 3e717522c2
commit fd0bca5c7c
13 changed files with 139 additions and 96 deletions

View File

@@ -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));
}
}
}