summaryrefslogtreecommitdiffstats
path: root/lib/Controller
diff options
context:
space:
mode:
authorMarco Nassabain <marco.nassabain@hotmail.com>2021-03-19 20:11:49 +0100
committerSean Molenaar <SMillerDev@users.noreply.github.com>2021-04-08 22:31:21 +0200
commit1a5ca7417249a991aaea4b36ab61e088cc827993 (patch)
treee2aca1c41bf242176b20cd2f4299fd3c068cd688 /lib/Controller
parentbbdd95c30d545cc7dd9719836a94c7b21b381c68 (diff)
✨ Add sharer display name into shared items
- Add mapSharedByDisplayNames in ShareService - Update ItemController to call function on items Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'lib/Controller')
-rw-r--r--lib/Controller/ItemController.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Controller/ItemController.php b/lib/Controller/ItemController.php
index cf4fe2237..4d2050e63 100644
--- a/lib/Controller/ItemController.php
+++ b/lib/Controller/ItemController.php
@@ -176,7 +176,8 @@ class ItemController extends Controller
);
break;
}
- $return['items'] = $items;
+ // Map sharer display names onto shared items
+ $return['items'] = $this->shareService->mapSharedByDisplayNames($items);
// this gets thrown if there are no items
// in that case just return an empty array
@@ -236,7 +237,8 @@ class ItemController extends Controller
$return['newestItemId'] = $this->itemService->newest($this->getUserId())->getId();
$return['feeds'] = $this->feedService->findAllForUser($this->getUserId());
$return['starred'] = count($this->itemService->starred($this->getUserId()));
- $return['items'] = $items;
+ // Map sharer display names onto shared items
+ $return['items'] = $this->shareService->mapSharedByDisplayNames($items);
// this gets thrown if there are no items
// in that case just return an empty array