Changed sender parameter to channel.

This commit is contained in:
Tom
2024-12-27 23:31:36 +00:00
parent 06bfe110bb
commit 8277ea0154
27 changed files with 113 additions and 134 deletions

View File

@@ -1,4 +1,5 @@
using HermesSocketLibrary.Requests.Messages;
using HermesSocketServer.Models;
using HermesSocketServer.Services;
using ILogger = Serilog.ILogger;
@@ -17,12 +18,11 @@ namespace HermesSocketServer.Requests
_logger = logger;
}
public async Task<RequestResult> Grant(string sender, IDictionary<string, object>? data)
public async Task<RequestResult> Grant(Channel channel, IDictionary<string, object> data)
{
var channel = _channels.Get(sender);
IEnumerable<TTSWordFilter> filters = channel.Filters.Get().Values;
_logger.Information($"Fetched all word filters for channel [channel: {sender}]");
_logger.Information($"Fetched all word filters for channel [channel: {channel.Id}]");
return RequestResult.Successful(filters, notifyClientsOnAccount: false);
}
}