using System.Security.Claims;

namespace GmRelay.Web.Services;

public static class ClaimsPrincipalExtensions
{
    public static bool TryGetTelegramId(this ClaimsPrincipal user, out long telegramId) =>
        long.TryParse(user.FindFirst("TelegramId")?.Value, out telegramId);
}
