-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Originally reported a year ago on r/tryunearth. Getting around to addressing this now due to being in a better headspace and after some users have recently brought up the issue again.
Background:
I realized the issue is every time we sync our things to Unearth, any save that isn't coming from Reddit but in the Unearth database is assumed to have been removed manually on Reddit. This isn't always the case (and hardly ever is actually). Instead, Reddit only returns the last ~1000 saves and therefore Unearth was simply mirroring Reddit, rather than keeping a longer history of saves as intended.
Solution:
We compare Unearth's saves with Reddit's to see what new things have been saved and removed, however, we only need to the former comparison and can remove any removal logic from the reddit repo fetchAllSaves method.[0]
Notes:
- in addition to the aforementioned change, the ability to bulk remove items from Unearth (via both the API and app) should also be added
- with that said, users should be warned/notified that Unearth is intended to be the single source of truth once they initially sync their saves and therefore should only remove/delete saves via Unearth
- that is until the browser extension is developed which will intercept's Reddit "unsave" API call and request Unearth's own deleteThing endpoint
[0]: https://github.com/tryunearth/api/blob/master/src/database/repositories/reddit.js#L26-L42