diff --git a/CHANGELOG.md b/CHANGELOG.md index e7d7f57..8e73cf6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ before starting to add changes. Use example [placed in the end of the page](#exa ## [Unreleased] +- [PR-202](https://github.com/OS2Forms/os2forms/pull/202) + - Removed non-digits from recipient id in Maestro digital post notifications. - [PR-189](https://github.com/OS2Forms/os2forms/pull/189) - Added support for MeMo 1.2 and added additional validation of MeMo actions. diff --git a/modules/os2forms_forloeb/src/MaestroHelper.php b/modules/os2forms_forloeb/src/MaestroHelper.php index d2dd0c5..80f3748 100644 --- a/modules/os2forms_forloeb/src/MaestroHelper.php +++ b/modules/os2forms_forloeb/src/MaestroHelper.php @@ -389,7 +389,10 @@ private function sendNotificationDigitalPost( $senderLabel = $subject; $messageLabel = $subject; - $recipientLookupResult = $this->digitalPostHelper->lookupRecipient($recipient); + // Remove all non-digits from recipient identifier. + $recipientIdentifier = preg_replace('/[^\d]+/', '', $recipient); + + $recipientLookupResult = $this->digitalPostHelper->lookupRecipient($recipientIdentifier); $actions = [ (new Action()) ->setActionCode(SF1601::ACTION_SELVBETJENING)