Changed sender parameter to channel.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using System.Text.Json;
|
||||
using HermesSocketLibrary.db;
|
||||
using HermesSocketLibrary.Requests.Messages;
|
||||
using HermesSocketServer.Models;
|
||||
using ILogger = Serilog.ILogger;
|
||||
|
||||
namespace HermesSocketServer.Requests
|
||||
@@ -20,9 +21,9 @@ 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 temp = new Dictionary<string, object>() { { "user", sender } };
|
||||
var temp = new Dictionary<string, object>() { { "user", channel.Id } };
|
||||
|
||||
var redemptions = new List<RedeemableAction>();
|
||||
string sql = $"SELECT name, type, data FROM \"Action\" WHERE \"userId\" = @user";
|
||||
@@ -32,7 +33,7 @@ namespace HermesSocketServer.Requests
|
||||
Type = r.GetString(1),
|
||||
Data = JsonSerializer.Deserialize<IDictionary<string, string>>(r.GetString(2), _options)!
|
||||
}));
|
||||
_logger.Information($"Fetched all chatters' selected tts voice for channel [channel: {sender}]");
|
||||
_logger.Information($"Fetched all chatters' selected tts voice for channel [channel: {channel.Id}]");
|
||||
return RequestResult.Successful(redemptions, notifyClientsOnAccount: false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user