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

@@ -38,8 +38,8 @@ namespace HermesSocketServer.Services
{
lock (_lock)
{
if (_channels.ContainsKey(userId))
return Task.FromResult<Channel?>(null);
if (_channels.TryGetValue(userId, out var channel))
return Task.FromResult<Channel?>(channel);
var actionTable = _configuration.Database.Tables["Action"];
var chatterTable = _configuration.Database.Tables["Chatter"];
@@ -62,7 +62,7 @@ namespace HermesSocketServer.Services
var redemptions = new RedemptionStore(userId, redemptionTable, actions, _database, _logger);
var voiceStates = new VoiceStateStore(userId, ttsVoiceStateTable, _voices, _database, _logger);
var channel = new Channel()
channel = new Channel()
{
Id = userId,
User = user,