Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/thunderbird_accounts/mail/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ def decode_app_password(secret):


def create_stalwart_account(user, app_password: Optional[str] = None) -> bool:
# Run this immediately for now, in the future we'll ship these to celery
if user.account_set.count() > 0 and user.account_set.first().stalwart_id:
return False

Expand Down
7 changes: 5 additions & 2 deletions src/thunderbird_accounts/subscription/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,11 @@ def paddle_transaction_complete(request: HttpRequest, paddle: Client):
status = transaction.status.value

if transaction and status in [Transaction.StatusValues.COMPLETED.value, Transaction.StatusValues.PAID.value]:
user.is_awaiting_payment_verification = True
user.save()
# Only set enable payment verification mode if they don't have an active subscription
# As the webhook could technically come in before or during this successUrl redirect...
if not user.has_active_subscription:
user.is_awaiting_payment_verification = True
user.save()

if settings.IS_DEV:
tasks.dev_only_paddle_fake_webhook.delay(transaction_id=transaction_id, user_uuid=user.uuid.hex)
Expand Down
Loading