From 644c9059616a281b3f2b086d7a2eb881378e2f12 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 17 Apr 2018 12:34:56 +0300 Subject: [PATCH] Enable recur for self hosters --- app/Models/Traits/HasRecurrence.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/app/Models/Traits/HasRecurrence.php b/app/Models/Traits/HasRecurrence.php index 87cab5187c19..610fefa860b1 100644 --- a/app/Models/Traits/HasRecurrence.php +++ b/app/Models/Traits/HasRecurrence.php @@ -15,6 +15,18 @@ trait HasRecurrence * @return bool */ public function shouldSendToday() + { + if (Utils::isSelfHost()) { + return $this->shouldSendTodayNew(); + } else { + return $this->shouldSendTodayOld(); + } + } + + /** + * @return bool + */ + public function shouldSendTodayOld() { if (! $this->user->confirmed) { return false; @@ -79,8 +91,7 @@ trait HasRecurrence return false; } - /* - public function shouldSendToday() + public function shouldSendTodayNew() { if (! $this->user->confirmed) { return false; @@ -114,7 +125,6 @@ trait HasRecurrence return $this->account->getDateTime() >= $nextSendDate; } } - */ /** * @throws \Recurr\Exception\MissingData