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.Store;
using ILogger = Serilog.ILogger;
@@ -17,7 +18,7 @@ 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)
{
IEnumerable<VoiceDetails> voices = _voices.Get().Select(v => new VoiceDetails()
{
@@ -25,7 +26,7 @@ namespace HermesSocketServer.Requests
Name = v.Value.Name
});
_logger.Information($"Fetched all TTS voices for channel [channel: {sender}]");
_logger.Information($"Fetched all TTS voices for channel [channel: {channel.Id}]");
return RequestResult.Successful(voices, notifyClientsOnAccount: false);
}
}