feat: added boilerplate cap for next stage of user prepare
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using JOBot.Proto;
|
||||
using JOBot.TClient.Services;
|
||||
using Telegram.Bot.Types;
|
||||
using User = JOBot.Proto.User;
|
||||
|
||||
namespace JOBot.TClient.Statements;
|
||||
|
||||
@@ -38,7 +37,7 @@ public class PrepareUserState(PrepareUserService prepareUserService, MenuService
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Continue prepare stage
|
||||
/// Check user logged
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="update"></param>
|
||||
@@ -50,6 +49,21 @@ public class PrepareUserState(PrepareUserService prepareUserService, MenuService
|
||||
await prepareUserService.Auth(update, ct);
|
||||
return;
|
||||
}
|
||||
await OnAuthStage(user, update, ct);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check user selected CV
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <param name="update"></param>
|
||||
/// <param name="ct"></param>
|
||||
private async Task OnAuthStage(GetUserResponse user, Update update, CancellationToken ct = default)
|
||||
{
|
||||
if (string.IsNullOrEmpty(user.CVUrl))
|
||||
{
|
||||
await prepareUserService.SelectCv(update, ct);
|
||||
}
|
||||
await menuService.RenderMenu(update, ct); //boilerplate
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user