Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/stable19' into stable19
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
2 parents 3473185 + 32ac00b commit e79abd9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
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
7 changes: 6 additions & 1 deletion lib/Search/GlobalScaleUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,12 @@ public function search($search) {

$result = [];
foreach ($users as $user) {
list(, $instance) = explode('@', $this->get('federationId', $user), 2);
$cloudId = $this->get('federationId', $user);
$pos = strrpos($cloudId, '@');
if ($pos === false) {
continue;
}
$instance = substr($cloudId, $pos + 1);
if ($this->configService->isLocalInstance($instance)) {
continue;
}
Expand Down

0 comments on commit e79abd9

Please sign in to comment.