🐛 Fix perk subscription getter

This commit is contained in:
2026-02-04 12:43:09 +08:00
parent e86f630024
commit 12199d99b7
8 changed files with 34 additions and 13 deletions

View File

@@ -19,6 +19,7 @@ public class AccountEventService(
RingService.RingServiceClient pusher,
Pass.Leveling.ExperienceService experienceService,
RemotePaymentService payment,
RemoteSubscriptionService subscriptions,
INatsConnection nats
)
{
@@ -223,6 +224,9 @@ public class AccountEventService(
public async Task<bool> CheckInDailyDoAskCaptcha(SnAccount user)
{
var perkSubscription = await subscriptions.GetPerkSubscription(user.Id);
if (perkSubscription is not null) return false;
var cacheKey = $"{CaptchaCacheKey}{user.Id}";
var needsCaptcha = await cache.GetAsync<bool?>(cacheKey);
if (needsCaptcha is not null)