Skip to content

feat: Support for legacy newsletter endpoint used by newsletter.tordonate.org

stephen requested to merge support-newsletter-torproject-org-signups into main

It was discovered sometime last week that newsletter.tordonate.org has a big, prominent newsletter signup form whose endpoint is the old donate-api subdomain used by the old donate site. When it goes away and is replaced by donate-neo, we should be able to support this form, as it is where many interested Tor users are directed when asked about newsletters and the like.

This MR makes the following changes to support this endpoint:

  • The URL subscription-request/ is now handled by tordonate.civicrm.urls and incoming traffic is passed to that app's views file.
  • In tordonate.civicrm.views.subscription_request_legacy, we reject the traffic if it isn't POST, and we reject the traffic if it doesn't contain the email POST value it should. If it has those things, we pass that value along as a formatted dict to civicrm.repository.newsletter_signup where it is handled just like newsletter interest generated from the donate form or standalone donate form.
  • Testing has been added to the CiviCRM repository test file to match.

Merge request reports

Loading