mastodon / mastodon

Your self-hosted, globally interconnected microblogging community
https://joinmastodon.org
GNU Affero General Public License v3.0
47.07k stars 6.97k forks source link

Post deletions on PeerTube are not being federated to Mastodon #22176

Open FediVideos opened 1 year ago

FediVideos commented 1 year ago

Steps to reproduce the problem

  1. Go to https://tilvids.com/w/wm3Y7ztbnjJS8XKAdpBiw3 and observe no spam
  2. Try opening same URL on Mastodon and you may see spam (I tested this on mstdn.social)
  3. Try opening spammer's account on the original page, you will see it has been deleted ...

Expected behaviour

Posts deleted on PeerTube should disappear on Mastodon too

Actual behaviour

Posts are remaining on Mastodon after deletion from PeerTube

Detailed description

Tilvids.com was getting hit pretty hard by spammers but the admin and moderators were able to keep posts deleted quickly.

However, the spammer posts are still visible through Mastodon leading to at least one instance suspending tilvids, despite tilvids acting quickly on spam.

I am not sure if this is a problem on Mastodon or PeerTube. If this is a PeerTube problem, let me know and I will report it there instead.

Specifications

Mastodon 4.0.2 (on mstdn.social) PeerTube 4.3.1 (on tilvids.com)

ineffyble commented 1 year ago

I can't find that post on mstdn.social at all. Do you have a direct link?

hvdijk commented 1 year ago

I cannot find it there either, but I can find it on mastodon.social and see the spam: https://mastodon.social/@theatticdwellers@tilvids.com/109479058589936040

FediVideos commented 1 year ago

It should open on mstdn.social too at https://mstdn.social/@theatticdwellers@tilvids.com/109479058612005377 (I just tried it again and it opened there fine)

Regardless of where you open it, if the spam is visible then Mastodon has not federated the PeerTube deletion.

hvdijk commented 1 year ago

It should open on mstdn.social too at https://mstdn.social/@theatticdwellers@tilvids.com/109479058612005377 (I just tried it again and it opened there fine)

For me, that one redirects to https://tilvids.com/w/f5bedd2d-1add-4c8c-a65d-721df7cfa69a.

And now I see on mastodon.social, it depends on whether I am logged in. If I am logged in, I see the spam there. If I am not logged in, it redirects. I am guessing it is the same for mstdn.social, and you are logged in there.

FediVideos commented 1 year ago

Yeah, I was assuming you were logged in. It doesn't really matter which instance you see the spam on, the fact the spam is there at all is the main issue.

Something is going wrong with PeerTube to Mastodon federation which is causing spam to pile up on Mastodon because it won't acknowledge the deletion on PeerTube.

trwnh commented 1 year ago

I'm wondering if Peertube is using Update activities to turn it into a Tombstone? I see all of those spam comments appear to be "edited -1 times".

EDIT: Nope, that's not quite it, but it is still weird that there's that -1 edits

EDIT: In any case, it appears that this is the relevant delivery code: https://github.com/Chocobozzz/PeerTube/blob/a219c9100b3ce8774d454497d46be87465bf664e/server/lib/activitypub/send/send-delete.ts#L71-L112

The Delete is sent to the parents, the followers of whoever deleted the comment, anyone mentioned in the comment, and the origin of the deleted comment.

FediVideos commented 1 year ago

For what it's worth, the -1 edits message has been around for a while, even before Mastodon's edit function went live.

The Delete is sent to the parents, the followers of whoever deleted the comment, anyone mentioned in the comment, and the origin of the deleted comment.

So, is this functioning correctly if the post is still visible on Masto? Should PeerTube be sending delete more widely?

trwnh commented 1 year ago

Should PeerTube be sending delete more widely?

Mastodon does more or less the same? https://github.com/mastodon/mastodon/blob/6cf57c676550068a59149ca82d63fcb5b5431158/app/lib/status_reach_finder.rb#L29-L42

Mastodon targets anyone a status replies to, reblogs, mentions, as well as anyone who reblogged or favourited or replied.

I'm not sure if we can rule out some weird malformation in the Delete activity Peertube is sending out, or some difference in its delivery strategy, but you can't really account for unauthenticated fetches because there's no way to track that information.

velw commented 1 year ago

Could it be related to #22154, a more general issue with deletions on Mastodon?

FediVideos commented 1 year ago

Should PeerTube be sending delete more widely?

Mastodon does more or less the same?

This just seems to happen far more often on Tilvids?

I wonder if this is a specific server thing?

By the way, I'm not a dev so I don't know if I should be posting this also on the PeerTube github? Or should I close this here first?