From 94deb89b9dd2a7c3b603862c74867dc42e3c20a0 Mon Sep 17 00:00:00 2001 From: ruslandoga Date: Tue, 9 Apr 2024 15:04:23 +0800 Subject: [PATCH] remove Plausible Team footer from self-hosted emails (#3980) * remove Plausible Team footer from self-hosted * don't test unsubscribe placeholder in small build --- lib/plausible_web/templates/layout/base_email.html.eex | 6 +++--- lib/plausible_web/templates/layout/priority_email.html.eex | 4 ++-- test/plausible_web/email_test.exs | 1 + 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/plausible_web/templates/layout/base_email.html.eex b/lib/plausible_web/templates/layout/base_email.html.eex index 0679b338b..f9ffd0af8 100644 --- a/lib/plausible_web/templates/layout/base_email.html.eex +++ b/lib/plausible_web/templates/layout/base_email.html.eex @@ -4,12 +4,12 @@ <%= @inner_content %>

-Regards,
+<%= if full_build?() do %>Regards,
The Plausible Team 💌 -

+

<% end %> --

<%= link(plausible_url(), to: plausible_url()) %>
-{{{ pm:unsubscribe }}} +<%= if full_build?() do %>{{{ pm:unsubscribe }}}<% end %> diff --git a/lib/plausible_web/templates/layout/priority_email.html.eex b/lib/plausible_web/templates/layout/priority_email.html.eex index bddd75b9d..3ecb07826 100644 --- a/lib/plausible_web/templates/layout/priority_email.html.eex +++ b/lib/plausible_web/templates/layout/priority_email.html.eex @@ -4,9 +4,9 @@ <%= @inner_content %>

-Regards,
+<%= if full_build?() do %>Regards,
The Plausible Team 💌 -

+

<% end %> --

diff --git a/test/plausible_web/email_test.exs b/test/plausible_web/email_test.exs index 9a23e0612..e80212735 100644 --- a/test/plausible_web/email_test.exs +++ b/test/plausible_web/email_test.exs @@ -31,6 +31,7 @@ defmodule PlausibleWeb.EmailTest do assert email.html_body =~ plausible_link() end + @tag :full_build_only test "renders unsubscribe placeholder" do email = Email.base_email()