summaryrefslogtreecommitdiffstats
path: root/apps/user_status/lib/Service
diff options
context:
space:
mode:
authorGeorg Ehrke <developer@georgehrke.com>2020-08-18 10:54:46 +0200
committerGeorg Ehrke <developer@georgehrke.com>2020-08-20 15:43:34 +0200
commitbd6a6cf3bff74dc5690fe032a4203165227f01d2 (patch)
treee66324bec9e142b859d171b051060850295bad5d /apps/user_status/lib/Service
parent03603db486debbb31dfa05486f3b10338a28b50c (diff)
downloadnextcloud-server-bd6a6cf3bff74dc5690fe032a4203165227f01d2.tar.gz
nextcloud-server-bd6a6cf3bff74dc5690fe032a4203165227f01d2.zip
Add Status Dashboard
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
Diffstat (limited to 'apps/user_status/lib/Service')
-rw-r--r--apps/user_status/lib/Service/StatusService.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/user_status/lib/Service/StatusService.php b/apps/user_status/lib/Service/StatusService.php
index 2cfdd5109a5..e36d605cee4 100644
--- a/apps/user_status/lib/Service/StatusService.php
+++ b/apps/user_status/lib/Service/StatusService.php
@@ -96,6 +96,17 @@ class StatusService {
}
/**
+ * @param int|null $limit
+ * @param int|null $offset
+ * @return array
+ */
+ public function findAllRecentStatusChanges(?int $limit = null, ?int $offset = null): array {
+ return array_map(function ($status) {
+ return $this->processStatus($status);
+ }, $this->mapper->findAllRecent($limit, $offset));
+ }
+
+ /**
* @param string $userId
* @return UserStatus
* @throws DoesNotExistException