summaryrefslogtreecommitdiffstats
path: root/lib/Db
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Db')
-rw-r--r--lib/Db/Item.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Db/Item.php b/lib/Db/Item.php
index 6b2b668b2..2a2629d3d 100644
--- a/lib/Db/Item.php
+++ b/lib/Db/Item.php
@@ -290,6 +290,11 @@ class Item extends Entity implements IAPI, \JsonSerializable
return $this->starred;
}
+ public function isShared(): bool
+ {
+ return $this->getSharedBy == '' && $this->getSharedWith == '';
+ }
+
public function isUnread(): bool
{
return $this->unread;
@@ -347,7 +352,10 @@ class Item extends Entity implements IAPI, \JsonSerializable
'rtl' => $this->getRtl(),
'intro' => $this->getIntro(),
'fingerprint' => $this->getFingerprint(),
- 'categories' => $this->getCategories()
+ 'categories' => $this->getCategories(),
+ 'sharedBy' => $this->getSharedBy(),
+ 'sharedWith' => $this->getSharedWith(),
+ 'isShared' => $this->isShared()
];
}