Fixed a lot of compiler warnings. Fixed 7tv connection.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user