Skip to content

Commit

Permalink
server: Remove duplicate logic check before sending subscription conf…
Browse files Browse the repository at this point in the history
…irmation email
  • Loading branch information
birkjernstrom committed Jan 3, 2025
1 parent 2d6f69c commit 4bf0212
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions server/polar/subscription/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -971,17 +971,7 @@ async def _on_subscription_activated(
session, subscription, WebhookEventType.subscription_active
)

# TODO: Copied this logic over. Why the extra check for customer
# confirmation vs. webhook/creator notification? Look into it, but avoid
# changing for now.
if (
subscription.started_at is not None
and subscription.started_at.date()
== subscription.current_period_start.date()
and not subscription.ends_at
):
await self.send_confirmation_email(session, subscription)

await self.send_confirmation_email(session, subscription)
await self._send_new_subscription_notification(session, subscription)

async def _on_subscription_uncanceled(
Expand Down

0 comments on commit 4bf0212

Please sign in to comment.