[feat] Do not fetch unknown Remove.object #1052
Labels
No labels
approved, awaiting change
broken setup
bug
cannot reproduce
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs change/feedback
needs docs
needs tests
not a bug
not our bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AkkomaGang/akkoma#1052
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The idea
When: receiving Remove activities (targeting the
http://joinmastodon.org/ns#featuredcollection, or in general?)Then: Do not fetch the Remove.object
The reasoning
In particular, the most common usage of Remove is for actions like "unpinned a post", where the post being unpinned is not socially relevant at the time of the Remove activity. A similar optimization occurs with Delete when the Delete.object is not known.
One problem that can be observed with an unknown object being fetched is that Akkoma will wrap it in a fake Create, and set the published datetime of that Create to the current datetime. The timeline function will then show this object at the top of the timeline, since it "arrived" just now. Unpinning a lot of posts can end up inadvertently spamming followers using Akkoma instances in the following corner case:
(Somewhat relatedly, I would appreciate a feature to have "fake Creates" tagged somehow and excluded from timelines. #1053 covers that separate feature.)
Have you searched for this feature request?
Generally reasonable. Currently
Removesahres a high-level function and error-handling with other activitiy types which actually want or need to fetch, so this will require splitting this up with the least amount of code duplication.Some more tangential clarifications:
This was brought up before, but let me clarify again: this is not the case. Akkoma never mangles incoming
publishedtimestamps nor generates ones for synthesisedCreates. It’s just that the database Flake ID (which contains time information) used for sorting is generated for the fetch time. The actualpublishedtime always shows and showed up correctly in API responses.Nit: for
Deletes this is not an optimisation but avoiding fetches is strictly necessary since an already deleted object cannot (or at least should not be able to) be fetched.Just for clarification: this requires
--prune-pinnedto be set and--keep-followed {post,all}to not be set when pruning. In all other configurations these posts will be preserved.and to clarify what i meant as well ^_^ -- it's not about the api responses, it's about the sorting. when you sort by flake id, you are effectively inferring the date received (or discovered) from the id, as opposed to using the date published on the object (or activity). "date received" is actually not a property of the activity, but rather a property of the graph or http request/resource.
a Delete might be stale and an object might exist at that identifier, but i get what you mean.
not sure what you mean; the sorting is part of the API response of timelines (but not part of the individual objects themselves)
something like this:
correct so far?
what i am talking about is taking that flake id, extracting the timestamp it represents, and setting that timestamp as the value of a jsonld property on an item node instead of on the activity:
in other words, what you describe as "not part of the individual objects themselves" can in fact be part of some other object -- that is the information being encoded into the flake id but not the json.
this is more in the realm of #1053 though. for #1052 we can proceed based on your earlier comments:
Not quite, but it doesn’t matter. FlakeIDs are 128-bit UUIDs and thus numeric(ally sorted) in code. They only encoded (such that their lexicographical ordering is identical to the numeric ordering) for API
I’m still not sure what you mean, but if it’s not relevant for this issue than it doesn’t matter ig