diff --git a/lib/Notification/NotificationHelper.php b/lib/Notification/NotificationHelper.php index 5de17fe1f..b47c02832 100644 --- a/lib/Notification/NotificationHelper.php +++ b/lib/Notification/NotificationHelper.php @@ -95,6 +95,15 @@ class NotificationHelper { $this->cardMapper->markNotified($card); } + public function markDuedateAsRead($card) { + $notification = $this->notificationManager->createNotification(); + $notification + ->setApp('deck') + ->setObject('card', $card->getId()) + ->setSubject('card-overdue', []); + $this->notificationManager->markProcessed($notification); + } + public function sendCardAssigned($card, $userId) { $boardId = $this->cardMapper->findBoardId($card->getId()); $board = $this->getBoard($boardId); diff --git a/lib/Service/CardService.php b/lib/Service/CardService.php index 94d773524..09138028d 100644 --- a/lib/Service/CardService.php +++ b/lib/Service/CardService.php @@ -407,6 +407,7 @@ class CardService { $card = $this->cardMapper->find($id); $card->setArchived(true); $newCard = $this->cardMapper->update($card); + $this->notificationHelper->markDuedateAsRead($card); $this->activityManager->triggerEvent(ActivityManager::DECK_OBJECT_CARD, $newCard, ActivityManager::SUBJECT_CARD_UPDATE_ARCHIVE); $this->changeHelper->cardChanged($id, false); return $newCard;