Skip to content

Commit

Permalink
avoid duplicate recipients
Browse files Browse the repository at this point in the history
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
  • Loading branch information
ArtificialOwl committed Oct 25, 2021
1 parent 48e32c4 commit 05152f8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/GlobalScale/MemberAdd.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 05152f8

Please sign in to comment.