From a9642192bee7fc468bfa8893fe4e14481ef7a68d Mon Sep 17 00:00:00 2001 From: mesilov Date: Sun, 17 Nov 2024 02:33:05 +0600 Subject: [PATCH] Add nullable comments to account events Added an optional comment field to `Bitrix24AccountBlockedEvent` and `Bitrix24AccountUnblockedEvent`. This change allows including context or additional information when these events are triggered. Refer to the related issue for more details. Signed-off-by: mesilov --- CHANGELOG.md | 2 ++ .../Events/Bitrix24AccountBlockedEvent.php | 7 ++++--- .../Events/Bitrix24AccountUnblockedEvent.php | 7 ++++--- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9591480c..ca54cfcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,8 @@ - Added method `Bitrix24AccountRepositoryInterface::findByApplicationToken` in contracts for support «[Delete Application](https://github.com/bitrix24/b24phpsdk/issues/62)» use case - Added `Bitrix24\SDK\Application\Contracts\Bitrix24Accounts\Exceptions\MultipleBitrix24AccountsFoundException` +- Added nullable comments in events `Bitrix24AccountBlockedEvent` and `Bitrix24AccountUnblockedEvent`, + see [add comment to events](https://github.com/bitrix24/b24phpsdk/issues/79). ### Changed diff --git a/src/Application/Contracts/Bitrix24Accounts/Events/Bitrix24AccountBlockedEvent.php b/src/Application/Contracts/Bitrix24Accounts/Events/Bitrix24AccountBlockedEvent.php index 4a397dc6..3cecb0f4 100644 --- a/src/Application/Contracts/Bitrix24Accounts/Events/Bitrix24AccountBlockedEvent.php +++ b/src/Application/Contracts/Bitrix24Accounts/Events/Bitrix24AccountBlockedEvent.php @@ -20,8 +20,9 @@ class Bitrix24AccountBlockedEvent extends Event { public function __construct( - public readonly Uuid $bitrix24AccountId, - public readonly CarbonImmutable $timestamp) - { + public readonly Uuid $bitrix24AccountId, + public readonly CarbonImmutable $timestamp, + public readonly ?string $comment = null + ) { } } \ No newline at end of file diff --git a/src/Application/Contracts/Bitrix24Accounts/Events/Bitrix24AccountUnblockedEvent.php b/src/Application/Contracts/Bitrix24Accounts/Events/Bitrix24AccountUnblockedEvent.php index 3227745e..ea274860 100644 --- a/src/Application/Contracts/Bitrix24Accounts/Events/Bitrix24AccountUnblockedEvent.php +++ b/src/Application/Contracts/Bitrix24Accounts/Events/Bitrix24AccountUnblockedEvent.php @@ -20,8 +20,9 @@ class Bitrix24AccountUnblockedEvent extends Event { public function __construct( - public readonly Uuid $bitrix24AccountId, - public readonly CarbonImmutable $timestamp) - { + public readonly Uuid $bitrix24AccountId, + public readonly CarbonImmutable $timestamp, + public readonly ?string $comment = null + ) { } } \ No newline at end of file