Display remote posts without storing them
When visiting a remote profile for the first time, old posts aren't shown. A fix was attempted in !907 (merged) and removed in !2297 (merged).
Viewing a remote timeline !2713 (merged) faces a similar issue.
We can use relays to improve this problem a lot, but Pleroma's database grows and grows #791 (closed). I've been told the object pruning solution in !1181 (merged) doesn't work either, and should be avoided.
However, this is an important problem that affects usability on the Fediverse, and it's an issue newcomers often fail to understand. If we can fix it, we should.
Lately I've been wondering if Pleroma can proxy requests to the upstream server, to display posts without storing them. A post would only be stored if acted upon by the user.
We could have endpoints like this:
- GET
/api/pleroma/proxy/account/:nickname
- returns a remote user's timeline - GET
/api/pleroma/proxy/timeline/:host
- returns a remote server's local timeline
Because they are separate endpoints, it's up to the frontend to decide how to deal with them.
For the account timeline, it can proxy the user's outbox, parse it, and return it in MastoAPI format.
For the instance timeline, I think a new AP solution would need to be added.
For interacting with posts, we'd need some way to interact by AP ID. Maybe something like this:
POST /api/pleroma/proxy/interact
with a request body like:
{
"ap_id": "https://example.tld/object/1234",
"action": "favourite"
}
...this would refetch the object and upgrade it to a first-class db entry before applying the action.
Unfortunately MastoAPI is very centered around primary keys instead of AP IDs.