Fixed a lot of compiler warnings. Fixed 7tv connection.

This commit is contained in:
Tom
2025-01-17 00:54:47 +00:00
parent b8d0e8cfd8
commit 5e33d594d2
78 changed files with 314 additions and 235 deletions

View File

@@ -26,12 +26,18 @@ namespace TwitchChatTTS.Hermes.Socket.Requests
_logger = logger;
}
public void Acknowledge(string requestId, string json, IDictionary<string, object>? requestData)
public void Acknowledge(string requestId, string? json, IDictionary<string, object>? requestData)
{
if (json == null)
{
_logger.Error($"No policies have been found: JSON is null.");
return;
}
var policies = JsonSerializer.Deserialize<IEnumerable<Policy>>(json, _options);
if (policies == null || !policies.Any())
{
_logger.Error($"No policies have been found.");
_logger.Error($"No policies have been found: object is null or empty.");
return;
}