Marco Nassabain
409c835433
🩹 Patch ItemController + test to use ShareService
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
dd818c6203
🚑 Fix circular inclusion: create ShareService
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
8fd3975907
🎨 Update share migration
...
- remove shared_with column
- make shared_by nullable
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
e96d7c9b1e
🎨 Item.php: make shared_by nullable
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
6a6f89ff94
🎨 Item.php: Remove shared_with
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
26569fd4a2
✨ Add FeedServiceV2 DI into ItemServiceV2
...
- used for finding dummy share feed
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
9bd27da9ba
🔥 Remove old share item logic & functions
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
d2e831fbaa
🎨 Update item share: add items to dummy feed
...
- create/find a 'shared with me' dummy feed
- clone item, initialize fields, add to dummy feed
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
f6014567f3
🗑 '!=' is discouraged, replaced by '!=='
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
a9863ec5f7
🗑 '!=' is discouraged, replaced by '!=='
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
af02560363
🎨 ItemMapperV2: add new offset code (findShared)
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
604f64c30c
🚨 Fix linter in those classes:
...
- ItemController
- ItemMapperV2
- ItemServicev2
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
75e81d5e0b
🥅 ItemService: catch NotFoundException + cleanup
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
ceefee0d3e
🗃 Change share migration version
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
88fc165f49
🔥 Remove old ItemMapper & ItemService
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
df8680b14a
🩹 Remove traces of feed_id being nullable
...
- feed_id is not nullable so we remove default values
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
08982fc540
✨ Add findAllSharedAfter
...
- adapted Controller, Service and Mapper (newItems)
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
0f6ec7c99c
✨ Implementer shared getter + add count in request
...
- ItemServiceV2: added sharedWithUser - returns unread shared items
- ItemController & FeedController - returning shared count
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
7e1a0b47cf
✨ ItemController (index): add case for shared items
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
d63e999d93
✨ ItemServiceV2: add findAllSharedWithUserWithFilters
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
1f0924fb57
✨ ItemMapperV2: exclude shared items in functions
...
updated the following functions to exclude shared_items:
- findAllInFeedAfter
- findAllInFolderAfter
- findAllFeed
- findAllFolder
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
26ae92bc7b
✨ ItemMapperV2: include shared in functions
...
updated the following functions to include shared items:
- findFromUser
- findForUserByGuidHash
- readAll
- findAllAfter
- findAllItems
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
83bdbc08a0
✨ ItemMapperV2: include shared in functions
...
updated the following functions to include shared items:
- findAllFromUser
- newest
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
c3cc70b15e
✨ ItemMapperV2: added findAllSharedWithUser funct
...
- return all items shared with a given user
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
907e764749
🚧 ItemService, Controller: added basic sharing
...
- TODO: check if relation already exists
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
237363e087
💡 Added comments to ItemMapper share fncts
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
54aa8b5270
🩹 Return starredCount in newItems response params
...
- returning sharedCount everywhere where starredCount is returned
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
ec5ae1a90a
🩹 ItemMapper->deleteUser: include shared items
...
- deletes items shared with a user
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
15dedf0ceb
🩹 Patch getNewestItemId: include shared articles
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
11bd056bdf
🩹 Patch readAll: concerns items shared with user
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
c640740444
🐛 Fix readAll: cannot read items we shared
...
- A shared item is still in our feed, but it's not ours to read
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
bf92ace3e8
🐛 Added sharedCount to feedController index resp.
...
- After reloading news app, the shared menu count wouldn't update
- The number would only update on click (call ItemController index)
- Adding it here fixes the issue
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
b27226d4ae
🚑 Fix bug - other user feeds show for shared item
...
- findAllFeeds doesn't return feeds of shared articles
- Disable feed cache handling for shared items
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
e78153c051
✨ Sharing: update ownership in sql (sharedwith)
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Aurélien
5f69c256e3
Add function for avoid duplicate item (share)
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
f3c4d744c0
🐛 Share Item: feed_id not nullable, copy feed_id
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Jimmy Huynh
98d72bac54
(*) fix: item Model
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Jimmy Huynh
4294842a00
(*) fix: item Model
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Jimmy Huynh
b402fddef9
(+) 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 >
2021-04-08 22:31:21 +02:00
Marco Nassabain
27ca98136a
✨ ItemController: return sharedCount in index req
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
785aaf6929
🐛 sharedCount: fix sql statement bug 1
=> 1
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
edee520fc8
🎨 Fix function name to sharedCount
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
ca2b8c6566
✨ Add count for unread items
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
5fc486a84f
🔥 shareItem: set unread = true for shared article
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
f2ef07c661
🔥 findAllShared: add table alias in sql statement
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Aurélien
f908df15b8
add function findAllShared in return
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
WENDLING NICOLAS
3936362343
✨ Get all shared items with an user
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Aurélien
6ebe676911
add root for access shared items
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
08171bb42d
✨ NewsItem: add share routes + controller func
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00
Marco Nassabain
527eef0727
✨ NewsItem: add share functions (mapper + service)
...
Signed-off-by: Marco Nassabain <marco.nassabain@hotmail.com >
2021-04-08 22:31:21 +02:00