using HermesSocketLibrary.Requests.Messages; using HermesSocketServer.Services; using ILogger = Serilog.ILogger; namespace HermesSocketServer.Requests { public class GetTTSWordFilters : IRequest { public string Name => "get_tts_word_filters"; public string[] RequiredKeys => []; private ChannelManager _channels; private ILogger _logger; public GetTTSWordFilters(ChannelManager channels, ILogger logger) { _channels = channels; _logger = logger; } public async Task Grant(string sender, IDictionary? data) { var channel = _channels.Get(sender); IEnumerable filters = channel.Filters.Get().Values; _logger.Information($"Fetched all word filters for channel [channel: {sender}]"); return RequestResult.Successful(filters, notifyClientsOnAccount: false); } } }