fix(emails): make sure group notification emails are only sent once per email

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-05-25 12:07:28 +02:00
parent dc3b93ffb5
commit 927e95f387
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
1 changed files with 1 additions and 0 deletions

View File

@ -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(&notify_follower(event, group, &1))
end