Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce subscription state on the chat API access #569

Merged
merged 14 commits into from Nov 28, 2023

Conversation

sabaimran
Copy link
Collaborator

  • 69c8f45: Use scopes to represent whether the user is subscribed. If billing is turned off, by default all users are subscribed.
  • e5b1350: Enforce limits to the chat endpoint based on state.billing_enabled
  • 771f9bc: If the user's subscription state was created over 7 days ago, consider their state expired. Eventually, we should assign their trial validity dynamically based on how they signed up.

Copy link
Member

@debanjum debanjum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding unit tests for these!

@sabaimran sabaimran merged commit 24b5aae into master Nov 28, 2023
10 checks passed
@sabaimran sabaimran deleted the features/enforce-subscription-status branch November 28, 2023 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants