Route invitation recipients only to mail delivery
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 1s

This commit is contained in:
tegwick 2026-08-09 21:25:20 +02:00
parent bf03b3e82a
commit 6962ad63b4
3 changed files with 14 additions and 1 deletions

View file

@ -39,7 +39,13 @@ class HTTPOutboxDeliveryAdapter:
}
if self.mail_url and event.event_type in _MAIL_EVENTS:
self._post(self.mail_url, envelope)
self._post(self.event_url, envelope)
event_envelope = dict(envelope)
event_data = dict(envelope["data"])
if "primary_email" in event_data:
event_data["recipient_present"] = True
del event_data["primary_email"]
event_envelope["data"] = event_data
self._post(self.event_url, event_envelope)
def _post(self, url: str, envelope: dict[str, object]) -> None:
with urlopen(