feat: added auth for telegram stage
This commit is contained in:
@@ -83,4 +83,19 @@ public class PrepareUserService(ITelegramBotClient bot, User.UserClient userClie
|
||||
if (!result.Success)
|
||||
throw new FallbackException(TextResource.FallbackMessage, update.Message, _bot);
|
||||
}
|
||||
|
||||
public async Task Auth(Update update, CancellationToken ct = default)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(update.Message?.From);
|
||||
|
||||
var url = await _userClient.GetHeadHunterAuthHookAsync(new GetHeadHunterAuthHookRequest()
|
||||
{
|
||||
UserId = update.Message.From.Id
|
||||
});
|
||||
|
||||
await _bot.SendMessage(
|
||||
update.Message.From.Id,
|
||||
string.Format(TextResource.AskForAuth, [url]),
|
||||
cancellationToken: ct);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user