public async Task ExecuteAsync(CancellationToken cancellationToken) { logger.LogInformation("Execute user reminder"); await foreach (var user in usersProvider.GetUsers().WithCancellation(cancellationToken)) { var response = await userRemindResponseGenerator.GetResponse(user); await client.SendResponse(user.TelegramId, response); } }
public async Task <IActionResult> Post( [FromQuery(Name = "telegram_id")] long telegramId, [FromQuery] string token ) { var response = await authorizationResponseCommand.StartCommand(telegramId, token); await client.SendResponse(telegramId, response); return(Ok()); }
private async Task HandleIncomingRequest(IRequest request) { var response = await requestHandler.GetResponse(request); await client.SendResponse(request.Author.TelegramId, response); }