From 135a6a2d538008a7254266582795fbcc9fe2571f Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Thu, 23 Jan 2020 23:09:26 +0100 Subject: [PATCH] Render templates before sending them --- api/src/Service/MailService.php | 3 +-- api/src/Service/MessageService.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/api/src/Service/MailService.php b/api/src/Service/MailService.php index 15c1516c..0901f4c1 100644 --- a/api/src/Service/MailService.php +++ b/api/src/Service/MailService.php @@ -33,8 +33,7 @@ public function sendEmail(Message $message) $sender = $this->commonGroundService->getResource($message->getSender()); $reciever = $this->commonGroundService->getResource($message->getReciever()); - $content = $this->commonGroundService->getResource($message->getContent()); - //$html = $this->commonGroundService->getResource($message->getContent().'/render'); + $content = $this->commonGroundService->getResource($message->getContent().'/render'); $html = $content['content']; $text = strip_tags(preg_replace('##i', "\n", $html), '\n'); diff --git a/api/src/Service/MessageService.php b/api/src/Service/MessageService.php index d1dc000e..3dccdca3 100644 --- a/api/src/Service/MessageService.php +++ b/api/src/Service/MessageService.php @@ -25,8 +25,7 @@ public function sendMessage(Message $message) { $sender = $this->commonGroundService->getResource($message->getSender()); $reciever = $this->commonGroundService->getResource($message->getReciever()); - $content = $this->commonGroundService->getResource($message->getContent()); - //$html = $this->commonGroundService->getResource($message->getContent().'/render'); + $content = $this->commonGroundService->getResource($message->getContent().'/render'); $html = $content['content']; $text = strip_tags(preg_replace('##i', "\n", $html), '\n');