From 05152f8c798635afa76c8ba8508ef14ee6859e5b Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Mon, 25 Oct 2021 11:38:47 -0100 Subject: [PATCH] avoid duplicate recipients Signed-off-by: Maxence Lange --- lib/GlobalScale/MemberAdd.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/GlobalScale/MemberAdd.php b/lib/GlobalScale/MemberAdd.php index 14f79cc39..edacecb05 100644 --- a/lib/GlobalScale/MemberAdd.php +++ b/lib/GlobalScale/MemberAdd.php @@ -214,7 +214,13 @@ public function result(array $events): void { $recipients = [$member->getUserId()]; } + $done = []; foreach ($recipients as $recipient) { + if (in_array($recipient, $done)) { + continue; + } + + $done[] = $recipient; $this->memberIsMailbox($circle, $recipient, $links, $password); } }