:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(email): add last name and email to member join email payload (#72960)
Reece Jones3b9c9b67047b
diff --git a/posthog/tasks/email.py b/posthog/tasks/email.pyindex ecba0788a65a..6bb8ceeb970b 100644--- a/posthog/tasks/email.py+++ b/posthog/tasks/email.py@@ -358,6 +358,11 @@ def send_member_join(invitee_uuid: str, organization_id: str) -> None:fallback="A new teammate",context={"task": "send_member_join", "field": "invitee_first_name", **log_context},)+ invitee_last_name = sanitize_display_name(+ invitee.last_name,+ fallback="",+ context={"task": "send_member_join", "field": "invitee_last_name", **log_context},+ )organization_name = sanitize_display_name(organization.name,fallback="your organization",@@ -374,6 +379,7 @@ def send_member_join(invitee_uuid: str, organization_id: str) -> None:"invitee": invitee,"organization": organization,"invitee_first_name": invitee_first_name,+ "invitee_last_name": invitee_last_name,"organization_name": organization_name,},)diff --git a/posthog/templates/email/member_join.html b/posthog/templates/email/member_join.htmlindex a949aba4c2b1..9ae34dcc3bc3 100644--- a/posthog/templates/email/member_join.html+++ b/posthog/templates/email/member_join.html@@ -1,9 +1,9 @@{% extends "email/base.html" %} {% load posthog_assets %} {% load posthog_filters %}-{% block heading %}{{ invitee_first_name }} accepted their PostHog invitation{% endblock %}+{% block heading %}{{ invitee_first_name }}{% if invitee_last_name %} {{ invitee_last_name }}{% endif %} accepted their PostHog invitation{% endblock %}{% block section %}<!-- prettier-ignore --><p>- {{ invitee_first_name }} (<a href="mailto:{{ invitee.email }}">{{ invitee.email }}</a>) just joined you at {{ organization_name }}.+ {{ invitee_first_name }}{% if invitee_last_name %} {{ invitee_last_name }}{% endif %} (<a href="mailto:{{ invitee.email }}">{{ invitee.email }}</a>) just joined you at {{ organization_name }}.</p><div class="mb mt text-center"><a class="button" href="{% absolute_uri %}">View PostHog insights</a>