chore: cleanup
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
namespace JOBot.TClient.Infrastructure.Attributes.Authorization;
|
||||
|
||||
/// <summary>
|
||||
///Атрибут допуска к команде пользователя не завершившего стадию PrepareUser
|
||||
/// Атрибут допуска к команде пользователя не завершившего стадию PrepareUser
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class)]
|
||||
public class AcceptNotPreparedAttribute : Attribute;
|
||||
@@ -4,14 +4,14 @@ using Telegram.Bot.Types;
|
||||
namespace JOBot.TClient.Infrastructure.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
/// Exception for fallback
|
||||
/// WARNING: Don't create new exception without throwing it
|
||||
/// Exception for fallback
|
||||
/// WARNING: Don't create new exception without throwing it
|
||||
/// </summary>
|
||||
public class FallbackException : Exception
|
||||
{
|
||||
public FallbackException(string message, Message botMessage, ITelegramBotClient botClient) : base(message)
|
||||
{
|
||||
botClient.SendMessage(chatId: botMessage.Chat.Id,
|
||||
botClient.SendMessage(botMessage.Chat.Id,
|
||||
TextResource.FallbackMessage);
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,9 @@ 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);
|
||||
public static bool IsPrepared(this GetUserResponse user)
|
||||
{
|
||||
return user is { Eula: true, IsLogged: true } &&
|
||||
!string.IsNullOrEmpty(user.CVUrl);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user