Use post notifications history parent to fetch latest sent post
[MAILPOET-2960]
This commit is contained in:
committed by
Veljko V
parent
57f0534241
commit
9f37ee4811
@@ -132,7 +132,7 @@ class Renderer {
|
|||||||
if ($parent instanceof NewsletterEntity) {
|
if ($parent instanceof NewsletterEntity) {
|
||||||
$newsletterId = $parent->getId();
|
$newsletterId = $parent->getId();
|
||||||
|
|
||||||
$lastPost = $this->newsletterPostsRepository->findOneBy(['newsletter' => $newsletter], ['createdAt' => 'desc']);
|
$lastPost = $this->newsletterPostsRepository->findOneBy(['newsletter' => $parent], ['createdAt' => 'desc']);
|
||||||
if ($lastPost instanceof NewsletterPostEntity) {
|
if ($lastPost instanceof NewsletterPostEntity) {
|
||||||
$newerThanTimestamp = $lastPost->getCreatedAt();
|
$newerThanTimestamp = $lastPost->getCreatedAt();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user