Conversation
This is such an annoying change but it is objectively better. Just gotta be real sure they didn't get mixed up anywhere along the way.
Shows a checkbox for the user and lets the admin know
94409e4 to
8de3668
Compare
I'm writing this offline so I can't check what the actual Flag activity spec looks like from Mastodon.
…m into federate-reports
This allows us to support mastodon reports that include multiple statuses
| def object(self): | ||
| """Generate a list of reported objects in a format Mastodon will like""" | ||
| items = [self.reported_user.remote_id] | ||
| if self.statuses: |
There was a problem hiding this comment.
When I test this self.statuses is always bookwyrm.Status.None here. So the status is never sent to Mastodon. However statuses obviously isn't empty because in the BookWyrm admin interface I can see it. So I have no idea what is going on but it's weird and means statuses aren't passed through to federated servers with the report.
|
@hughrun Would you be able to take another look at this? I haven't meaningfully changed anything besides resolving merge conflicts, but I'm puzzled as to why Mastodon wouldn't be able to parse it. This is an Activity from my local: And it seems to match the expected format according to the docs: |
|
Hi @mouse-reeve I took another look at this. There is a problem, but I think I misunderstood what it was earlier. First of all, reports are definitely sent TO Mastodon if you report a user from Mastodon. However, Mastodon is not sending {
"@context": "https://www.w3.org/ns/activitystreams",
"id": "https://ausglam.space/bd5b93f7-177c-4418-abc1-7b703fe508fc",
"type": "Flag",
"actor": "https://ausglam.space/actor",
"content": "testing 123",
"object": [
"https://example.com/user/h",
"https://example.com/user/h/status/2"
]
}In this regard they are kind of compliant with the actual spec, but also noncompliant because they're sending The fact that there's a compulsory field missing basically breaks everything: reports are received from Mastodon, but I can't even load the Reports page because none of the external Report objects have user ids. I do wonder a bit about the sense of sending a report about a user "to" that user's inbox address, but I guess if we have the correct logic, it won't actually hit their feed for them to see it. As you can see above, Mastodon sends the user as the first item in
There's probably a third less hacky option but those are two off the top of my head. As a much less problematic issue, I noticed that reports from external servers have a message that they were not reported to an external server which, uh obviously not so maybe that needs to be adjusted. |
Reports should be sent (if the user wants) to the home instance for remote users. I'm using mastodon's Flag activity as a template: https://docs.joinmastodon.org/spec/activitypub/#Flag
Fixes #962
Components:
usermeans the user doing the reporting, not the reported user