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,3 +1,4 @@
using HermesSocketServer.Models;
using HermesSocketServer.Store;
using ILogger = Serilog.ILogger;
@@ -18,9 +19,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 user = _users.Get(sender);
var user = _users.Get(channel.Id);
if (user == null)
return RequestResult.Failed("Unable to find user data.", notifyClientsOnAccount: false);