Skip to content

fix: correct subscription expiration logic#93

Merged
russell-archer merged 1 commit into
russell-archer:mainfrom
jixuqianxing:patch-1
Oct 20, 2025
Merged

fix: correct subscription expiration logic#93
russell-archer merged 1 commit into
russell-archer:mainfrom
jixuqianxing:patch-1

Conversation

@jixuqianxing
Copy link
Copy Markdown
Contributor

The current logic treats expired subscriptions as purchased because it used expirationDate < Date() in the assignment. This PR fixes that logic so purchased is true only when the subscription is still valid and not upgraded.

The current logic treats expired subscriptions as purchased because it used `expirationDate < Date()` in the assignment. This PR fixes that logic so `purchased` is true only when the subscription is still valid and not upgraded.
@russell-archer russell-archer self-requested a review October 20, 2025 17:04
@russell-archer russell-archer added the bug Something isn't working label Oct 20, 2025
@russell-archer
Copy link
Copy Markdown
Owner

Thank you for spotting my stupid mistake with comparing expirationDate < Date()!

There's similar logic in several other places and that IS correctly handled. For some reason I just couldn't "see" my mistake. Thanks very much for the fix!!

@russell-archer russell-archer merged commit c3e18bd into russell-archer:main Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants