Skip to content

Commit

Permalink
Fixed bulk imports
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinMystikJonas committed Jun 9, 2023
1 parent 3a18ac2 commit a6ac160
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Endpoints/Import/AbstractImportRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
*/
abstract class AbstractImportRequest extends AbstractRequest
{
public array $contacts;

/**
* The maximum contacts per single request
*
Expand Down Expand Up @@ -60,7 +58,7 @@ abstract public function settings(): Model;
protected function sendInChunkMode(): ?StatusResponse
{
// Store the original contact list
$originalFullContactList = $this->data;
$originalFull = $this->data;
$lastResponse = null;

// Chunk the array of contacts send it in multiple requests
Expand All @@ -72,7 +70,7 @@ protected function sendInChunkMode(): ?StatusResponse
}

// Restore to original array
$this->contacts = $originalFullContactList;
$this->data = $originalFull;

return $lastResponse;
}
Expand Down

0 comments on commit a6ac160

Please sign in to comment.