Skip to content

Commit

Permalink
Fix issue when unsubscribe all newsletters in bulk
Browse files Browse the repository at this point in the history
The issue was caused by missing mailTypeId parameter necessary
to emit the recently added event.

remp/remp#675
  • Loading branch information
rootpd committed Oct 5, 2021
1 parent 5049d99 commit 48f09b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Repositories/MailUserSubscriptionsRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ final public function unsubscribeUserAll($user)
$subscribeRequests[] = (new MailSubscribeRequest())
->setUser($user)
->setSubscribed(false)
->setMailTypeCode($subscribedMailType['code']);
->setMailTypeId($subscribedMailType['id']);
}
$result = $this->apiClient->bulkSubscribe($subscribeRequests);

Expand Down

0 comments on commit 48f09b0

Please sign in to comment.