Bookmarked objects are not refetched after running prune_objects
Environment
- Installation type (OTP or From Source): From Source
- Pleroma version (could be found in the "Version" tab of settings in Pleroma-FE): 2.6.50-0-g4c5b45ed-develop+dev
- Elixir version (
elixir -v
for from source installations, N/A for OTP): Elixir 1.14.5, Erlang/OTP 25 - Operating system: Arch Linux
- PostgreSQL version (
psql -V
): 15.4
Bug description
After running mix pleroma.database prune_objects
, remote objects in bookmarks older than remote_post_retention_days
seemingly disappear from bookmarks. Digging around the database reveals the row in the bookmarks
table still exists, but the object is simply never refetched when querying /api/v1/bookmarks
.
Reproduction steps
- Set
remote_post_retention_days
in config to-1
- Fetch a remote post and add it to the bookmarks
- Run
mix pleroma.database prune_objects
and restart pleroma - Refresh bookmarks
- The remote post no longer shows up in the bookmarks
Notes
After some digging around in the source code, I found that while Object.normalize/2
does have the option to fetch objects on-the-fly, it is explicitly disabled in MastoAPI's status_view.ex
(line 167, line 236). Toggling this on causes the issue to disappear, though given that this never seemed to be on(??), coupled with my somewhat lacking knowledge of that part of the internals, I'm not sure if that is the right solution(?)
Edited by sleepycrow