Skip to content
Snippets Groups Projects
Commit 938a44af authored by Florian Azizian's avatar Florian Azizian
Browse files

Fix M2M with empty body

parent cfee0a6b
No related branches found
No related tags found
No related merge requests found
......@@ -326,11 +326,11 @@ class SendMessageExchangeController
{
$aReturn = [];
$oBody = new \stdClass();
if (!empty($aArgs['body'])) {
$entityRoot = EntityModel::getEntityRootById(['entityId' => $aArgs['TransferringAgencyInformations']['entity_id']]);
$userInfo = UserModel::getById(['id' => $GLOBALS['id'], 'select' => ['firstname', 'lastname', 'mail']]);
$headerNote = $userInfo['firstname'] . ' ' . $userInfo['lastname'] . ' (' . $entityRoot['entity_label'] . ' - ' . $aArgs['TransferringAgencyInformations']['entity_label'] . ' - ' .$userInfo['mail'].') : ';
$oBody = new \stdClass();
$oBody->value = $headerNote . ' ' . $aArgs['body'];
} else {
$oBody->value = '';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment