diff --git a/.env b/.env index 9dc2232..e9a466b 100644 --- a/.env +++ b/.env @@ -35,4 +35,5 @@ DEFAULT_URI=http://localhost DATABASE_URL="postgresql://postgres:idm2022IDM@127.0.0.1:5440/sms_scheduler?serverVersion=16&charset=utf8" SMS_GATEWAY_API_KEY=INSERTHERE +STATUS_NUMBER=123 ###< doctrine/doctrine-bundle ### diff --git a/config/services.yaml b/config/services.yaml index c7cf163..e7c23ae 100644 --- a/config/services.yaml +++ b/config/services.yaml @@ -12,6 +12,7 @@ services: autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. bind: string $sms_gateway_api_key: '%env(SMS_GATEWAY_API_KEY)%' + string $status_number: '%env(STATUS_NUMBER)%' # makes classes in src/ available to be used as services # this creates a service per class whose id is the fully-qualified class name diff --git a/src/Command/ContactUncontactedCommand.php b/src/Command/ContactUncontactedCommand.php index db72c23..11477a8 100644 --- a/src/Command/ContactUncontactedCommand.php +++ b/src/Command/ContactUncontactedCommand.php @@ -29,15 +29,18 @@ class ContactUncontactedCommand extends Command private HttpClientInterface $httpClient; private string $sms_gateway_api_key; + private string $status_number; public function __construct(EntityManagerInterface $entityManager, HttpClientInterface $httpClient, - string $sms_gateway_api_key) + string $sms_gateway_api_key, + string $status_number) { parent::__construct(); $this->entityManager = $entityManager; $this->httpClient = $httpClient; $this->sms_gateway_api_key = $sms_gateway_api_key; + $this->status_number = $status_number; } protected function configure(): void @@ -137,7 +140,7 @@ class ContactUncontactedCommand extends Command ], 'body': { 'type': 'auto', - 'content': 'SMS-Versand-Update: Insg. {$countSent} versendet. Total versucht: {$countTotal}.' + 'content': 'SMS-Versand-Update:\n\n Insg. {$countSent} versendet.\nTotal versucht: {$countTotal}.' }, 'minimumNumberOfMessageParts': 1, 'maximumNumberOfMessageParts': 8,