feat: implemented registration stage of preparation on PrepareUserState
implemented auth, added auth tools AcceptNotPreparedAttribute.cs, IAuthorizedTelegramCommand.cs
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
namespace JOBot.TClient.Infrastructure.Attributes.Authorization;
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)]
|
||||
public class AcceptNotPreparedAttribute : Attribute;
|
||||
@@ -0,0 +1,9 @@
|
||||
using JOBot.Proto;
|
||||
|
||||
namespace JOBot.TClient.Infrastructure.Extensions;
|
||||
|
||||
public static class GRpcModelsExtensions
|
||||
{
|
||||
public static bool IsPrepared(this GetUserResponse user) => user is { Eula: true, IsLogged: true } &&
|
||||
!string.IsNullOrEmpty(user.CVUrl);
|
||||
}
|
||||
Reference in New Issue
Block a user