using HermesSocketServer.Models; using ILogger = Serilog.ILogger; namespace HermesSocketServer.Requests { public class GetChatterIds : IRequest { public string Name => "get_chatter_ids"; public string[] RequiredKeys => []; private ILogger _logger; public GetChatterIds(ILogger logger) { _logger = logger; } public Task Grant(Channel channel, IDictionary data) { IEnumerable ids = channel.Chatters.Get().Values.Select(c => c.ChatterId); _logger.Information($"Fetched all chatters for channel [channel: {channel.Id}]"); return Task.FromResult(RequestResult.Successful(ids, notifyClientsOnAccount: false)); } } }