Added Actions & Redemptions updates via websocket messages. Updated RedemptionManager due to live changes.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
using System.Text.Json;
|
||||
using HermesSocketServer.Models;
|
||||
using HermesSocketServer.Messages;
|
||||
using Serilog;
|
||||
using TwitchChatTTS.Chat.Commands.Limits;
|
||||
using TwitchChatTTS.Chat.Groups;
|
||||
@@ -24,7 +24,7 @@ namespace TwitchChatTTS.Hermes.Socket.Requests
|
||||
|
||||
public void Acknowledge(string requestId, string json, IDictionary<string, object>? requestData)
|
||||
{
|
||||
var policy = JsonSerializer.Deserialize<PolicyMessage>(json, _options);
|
||||
var policy = JsonSerializer.Deserialize<Policy>(json, _options);
|
||||
if (policy == null)
|
||||
{
|
||||
_logger.Warning($"Policy data failed: null");
|
||||
@@ -40,7 +40,7 @@ namespace TwitchChatTTS.Hermes.Socket.Requests
|
||||
|
||||
_logger.Debug($"Policy data [policy id: {policy.Id}][path: {policy.Path}][group id: {policy.GroupId}][group name: {group.Name}]");
|
||||
_policies.Set(group.Name, policy.Path, policy.Usage, TimeSpan.FromMilliseconds(policy.Span));
|
||||
_logger.Information($"Policy has been updated [policy id: {policy.Id}]");
|
||||
_logger.Information($"Policy has been created [policy id: {policy.Id}]");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user