From e09922c8df39ffba7df5639e729a08dea6703584 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Thu, 7 Aug 2025 02:37:09 +0800 Subject: [PATCH] :necktie: Make subscribed user no longer need captcha in check in --- DysonNetwork.Pass/Account/AccountEventService.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/DysonNetwork.Pass/Account/AccountEventService.cs b/DysonNetwork.Pass/Account/AccountEventService.cs index 751c5b8..d18f235 100644 --- a/DysonNetwork.Pass/Account/AccountEventService.cs +++ b/DysonNetwork.Pass/Account/AccountEventService.cs @@ -14,7 +14,8 @@ public class AccountEventService( Wallet.PaymentService payment, ICacheService cache, IStringLocalizer localizer, - PusherService.PusherServiceClient pusher + PusherService.PusherServiceClient pusher, + SubscriptionService subscriptions ) { private static readonly Random Random = new(); @@ -172,6 +173,9 @@ public class AccountEventService( public async Task CheckInDailyDoAskCaptcha(Account user) { + var perkSubscription = await subscriptions.GetPerkSubscriptionAsync(user.Id); + if (perkSubscription is not null) return false; + var cacheKey = $"{CaptchaCacheKey}{user.Id}"; var needsCaptcha = await cache.GetAsync(cacheKey); if (needsCaptcha is not null)