web(activity_pub/utils): temporarily deal with nil status ID when dealing with report #1082
No reviewers
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!1082
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "Yonle/akkoma:fixreport"
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?
temporarily addresses #712
EDIT: does not address
#599 and #366As noted in #712, the real fix here is to stop mangling and deleting the post references for fetched or deleted posts. But given this still didn’t come to be and a
nilreject like this will still be needed for already messed up reports (or a db migration to fully remove existingnils), i guess it makes sense to merge something like this as a interim bandaid to at least perevent reportsfrom getting stuck, yeahHowever, your commit message and comment are incorrect. This does not only occur for deleted posts, but (as discussed in #712) also all posts initially discovered via fetch. This also does nothing for #599 and #366 which you linked. They did not fail with a
500 Internal Servererror as you’d expect from the kind of clause mismatch fixed here, but because user lookup or instance rules blocked progression. Please do not claim fixes for only vaguely similar issues without proper confirmation.i was about to adjust the points brought up above (+ the commit title style, should be sth like: ``) and merge since the PR is set to be editable by maintainers, but then noticed you sign your commits.
Often when someone signs their commits they’ll want to keep the signature and edit commits themself. On the other hand this PR is set to be editable by maintainers, but perhaps you just missed the toggle to disable this. So, I’ll wait for you to come back to this and let me know what you prefer and/or edit it yourself.
@Oneric wrote in #1082 (comment):
I am quite aware of that. For now, it's better to be an bandaid as of now before admin open issue about similar issue.
My bad. At the time i was creating a tempfix, I haven't really read much on the existing issue, so here goes my first assumption (but the thing is, the post exist on my server, but the
idbeing null here is a strange quirk).This is a strange one. I will alter the commit message probably the next morning.
web(activity_pub/utils): deal with deleted activity on strip_report_status_datato web(activity_pub/utils): temporarily deal withnilactivity ID when dealing with reportweb(activity_pub/utils): temporarily deal withto web(activity_pub/utils): temporarily deal withnilactivity ID when dealing with reportnilstatus ID when dealing with report814d7ddd252a8a7bf55d@ -801,2 +801,4 @@|> Enum.map(fnact when is_map(act) -> act["id"]act when is_binary(act) -> act_ -> nil # the reported post has been deletedthe comment here is still misleading/wrong
(and the commit title ideally consistently uses
/for identifying the section, not a mix of/and parentheses)2a8a7bf55dca647214a2The linter isn’t happy:
Make sure to run
mix format(but beware if you’re uing elixir <1.19 results may differ from CI!) andmix test || mix test --failed || mix test --failedlocallyty