throw new HTTPException\NotFoundException('Group not found.');
}
+ $contactIds = [];
+
foreach ($contacts as $cid) {
$cdata = Contact::getPublicAndUserContactID($cid, $group['uid']);
if (empty($cdata['user'])) {
throw new HTTPException\NotFoundException('Invalid contact.');
}
- DBA::delete('group_member', ['gid' => $gid, 'contact-id' => $cdata['user']]);
+ $contactIds[] = $cdata['user'];
}
+
+ DBA::delete('group_member', ['gid' => $gid, 'contact-id' => $contactIds]);
}
/**
if (empty($request['account_ids']) || empty($this->parameters['id'])) {
DI::mstdnError()->UnprocessableEntity();
}
+
return Group::removeMembers($this->parameters['id'], $request['account_ids']);
}
if (empty($request['account_ids']) || empty($this->parameters['id'])) {
DI::mstdnError()->UnprocessableEntity();
}
+
return Group::addMembers($this->parameters['id'], $request['account_ids']);
}