From 927e95f387653c7d620e9051c30843ba49c2d65c Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 25 May 2023 12:07:28 +0200 Subject: [PATCH] fix(emails): make sure group notification emails are only sent once per email Signed-off-by: Thomas Citharel --- lib/web/email/group.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/web/email/group.ex b/lib/web/email/group.ex index da29082b..b4e5b03b 100644 --- a/lib/web/email/group.ex +++ b/lib/web/email/group.ex @@ -26,6 +26,7 @@ defmodule Mobilizon.Web.Email.Group do users ++ [Users.get_user_with_activity_settings!(actor.user_id)] end end) + |> Enum.uniq_by(& &1.email) |> Enum.each(¬ify_follower(event, group, &1)) end