diff options
author | Jimmy Huynh <jimmy.huynh@etu.unistra.fr> | 2021-01-26 18:14:05 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-04-08 22:31:21 +0200 |
commit | b402fddef9c1939aa501447bd6064449c4d41d3e (patch) | |
tree | 9a3224239bd305424d1ff04ef990efef8b0afa2a /lib | |
parent | 27ca98136a98f273971712360435086b365b4957 (diff) |
(+) Adding sharing_user names to EVERY articles + pre-condition if sharedArticle: no title feed (e.g.: from wikiRSS...)
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Db/Item.php | 10 |
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() ]; } |