Federate private message reports (fixes #4436)#6557
Conversation
fcb4844 to
383a367
Compare
383a367 to
c626756
Compare
f148b84 to
cc37cd9
Compare
|
Hello, would it be please possible to bump this issue? The instance I'm using is currently considering to implement an active monitoring and moderation of (some) user DMs to solve the problem, because they have ran into problems caused by reports not being propagated and someone using our instance to actively harrass and send death threats to users on other instances, which was missed because of reports not getting to them. While I understand that ActivityPub DMs are basically public, and I don't really mind moderation, the phrase "This instance is reading your DMs" will be a PR disaster, plus in general combating spam and harrasment is important - being able to ban users at their source instance before they can harrass more people is IMO serious issue to solve, especially since the PR seems to be ready for review. Thank you for all the work you're doing! |
| () => listReports(alpha), | ||
| r => r.items.length === 1, | ||
| ); | ||
| const r = list_reports.items[0] as PrivateMessageReportView; |
There was a problem hiding this comment.
This as casting looks dangerous. Its not even being done on .data
There was a problem hiding this comment.
What do you mean by dangerous? Worst case the test will fail. And there is no .data here.
There was a problem hiding this comment.
Ah I forgot items is the data for paged_responses.
| pub type SearchableObjects = Either<Either<PostOrComment, UserOrCommunity>, ApubMultiCommunity>; | ||
|
|
||
| pub type ReportableObjects = Either<PostOrComment, ApubCommunity>; | ||
| pub type ReportableObjects = Either<PostOrComment, Either<ApubCommunity, ApubPrivateMessage>>; |
There was a problem hiding this comment.
I know this is outside the scope of this PR, but there has to be a better way than doing these either chains.
Why can't an enum for the different possible types work?
There was a problem hiding this comment.
Thats not possible, Either only works because the Activitypub library implements Object for Either. To make it work with arbitrary enums would require a derive macro for Object.
There was a problem hiding this comment.
Why not just make sure your apub types impl that Object trait directly. And define enums that extend that trait.
b0eabb8 to
d1b72ec
Compare
I remember trying this in the past and being unable to make it work, but now it seems really straightforward.