summaryrefslogtreecommitdiffstats
path: root/lib/Service/FolderServiceV2.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Service/FolderServiceV2.php')
-rw-r--r--lib/Service/FolderServiceV2.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/Service/FolderServiceV2.php b/lib/Service/FolderServiceV2.php
index ae8d37816..d13b4afc0 100644
--- a/lib/Service/FolderServiceV2.php
+++ b/lib/Service/FolderServiceV2.php
@@ -178,4 +178,21 @@ class FolderServiceV2 extends Service
$folder->setOpened($open);
return $this->mapper->update($folder);
}
+
+ /**
+ * Mark a folder as read
+ *
+ * @param string $userId Folder owner
+ * @param int $id Folder ID
+ * @param int|null $maxItemID Highest item ID to mark as read
+ *
+ * @throws ServiceConflictException
+ * @throws ServiceNotFoundException
+ */
+ public function read(string $userId, int $id, ?int $maxItemID = null): void
+ {
+ $folder = $this->find($userId, $id);
+
+ $this->mapper->read($userId, $folder->getId(), $maxItemID);
+ }
}