Automattic / wordpress-activitypub

ActivityPub for WordPress
https://wordpress.org/plugins/activitypub/
MIT License
496 stars 76 forks source link

Comment which is an answer to a comment NOT made in Fediverse gets posted to Fediverse #652

Closed jaschaurbach closed 10 months ago

jaschaurbach commented 10 months ago

Quick summary

I answered to a comment made directly on my blog. The answer was posted into the Fediverse as well and is now lacking context.

Steps to reproduce

Answer to a comment made on the blog (not made via Activity Pub!)

What you expected to happen

The answer appears on the blog and nowhere else

What actually happened

The answer was posted into the fediverse as well, lacking context

The comment I made appeared on the timeline as well which in my opinion should not be there.

Bildschirmfoto 2024-01-12 um 08 51 49

Impact

All

Available workarounds?

No and the platform is usable

Logs or notes

No response

janboddez commented 10 months ago

I noticed in the latest master that local comments made by site authors are also no longer federated ... Is that possible?

Say I post a short status update and then reply to that on the blog ... I'd want my "followers" to see this too. That is how it works in v2.0.1.

I don't want replies to non-federated comments being federated, if that makes sense. But if the reply is to a post which is also federated, and the author is the blog author (or another user with at least author rights), wouldn't it make sense to still allow it to get federated? The context (i.e., the parent post) would be in the Fediverse, too, after all.

Could there be a way we add this back in, maybe behind a flag or something? (Or simply check for an empty comment_parent?)

pfefferle commented 10 months ago

This should work! If not it's a bug and I have to fix it! Thanks for reporting!

pfefferle commented 10 months ago

@janboddez I've commited a fix, let me know if it now works as you expect it!

janboddez commented 10 months ago

I'll give it a try when I have the chance, probably tonight!

janboddez commented 10 months ago

@janboddez I've commited a fix, let me know if it now works as you expect it!

Seems to work again! (Not sure what was changed and if the original issue [this one] is still gone, but both "admin replies" to posts and "admin replies" to "Fediverse comments" work for me on the latest master. That is, they do get federated.)

But, I noticed something else: in the latest master, not all comments get a "Reply link" shown underneath them (to anonymous visitors). And it reappears immediately as soon as install v2.0.1 again ...

In my view, anybody should still be able to reply (on the site), to any and all comments (if comment threading is enabled and comments are open, of course) ...

janboddez commented 10 months ago

[N]ot all comments get a "Reply link" shown underneath them (to anonymous visitors).

The "Reply link" is there for logged-in users (at least for me as an editor/admin).

pfefferle commented 10 months ago

They are not there, because federated comments should not commented locally. Because the original author of the comment will never get notified.

janboddez commented 10 months ago

They are not there, because federated comments should not commented locally. Because the original author of the comment will never get notified.

Oh, I see. That said, isn't that true for all replies to comments? I mean, on a native WordPress install? I might leave a comment and totally forget about it. Edit: since I can still reply, and those replies will get federated out, I'm okay with this behavior. It just seemed odd at first. 😄

But, even then it is not appearing for the test comment I created on the site (which got federated out, not in, if you know what I mean).

pfefferle commented 10 months ago

But, even then it is not appearing for the test comment I created on the site (which got federated out, not in, if you know what I mean).

Sure, but the result is the same. You have a federated comment and if there are local answers, the fediverse will not see them. I know this is not perfect yet, but it is the only solution that is consistent and relatively easy to implement... and even that was hard...

pfefferle commented 10 months ago

I will work on a replacement to the reply button (for federated reactions), so that blog visitors will see a lightbox, very similar to the follow UI, to redirect the user to his/her fediverse instance to reply there.

janboddez commented 10 months ago

You have a federated comment and if there are local answers, the fediverse will not see them.

Doesn't it make sense for the local author to still (want to) see local answers? Even if the Fediverse does not?

(This somehow makes me think of Hometown, the Mastodon fork that allows for local-only posts.)

Like, there's a lot of [post types, etc.] that the Fediverse doesn't get to see. 😉 (Not saying I need this, I'm just asking, haha. It seems a bit strange is all.)

pfefferle commented 10 months ago

But then I have to always check the whole thread up to the post: What about if you answer to a comment from the fediverse? should local answers to this reply be possible then?

pfefferle commented 10 months ago

and good point... I have to also check if the (custom-)post(-type) was federated before federating the comment :(

If a post is not federated, all comments will be local and also yours can be replied, also if you reply to a local comment, it will stay local and can be replied.

janboddez commented 10 months ago

What about if you answer to a comment from the fediverse? should local answers to this reply be possible then?

I don't think it would hurt, to be honest. But I do understand why you might not want it. (Still, I'd assume an "exception" for local comments that get federated out.)

I also don't think you need to check the thread. Just the parent comment (if any):

  1. If it came from the Fediverse, do federate replies by site authors. (Optionally, disable local replies.)
  2. If it's local, allow local replies (regardless of its federation status). This way, a reply to a site author's local reply will still show up locally. Even if that original comment was federated out.

You're right about not federating replies to non-federated post types. Since there's no per-post federation status (I think), you'd only have to check against the parent post's type.

janboddez commented 10 months ago

I also don't think you need to check the thread.

Just to clarify: suppose a site author replies ("locally") to a "Fediverse comment." And that their reply gets federated. All good. Now suppose you allow replies, and that an anonymous visitor (or subscriber) replies to this comment. The new reply is (obviously) not federated out. But it is still displayed on the site, and the site author is still notified, even if the original "Fediverse commenter" is not. I think this kind of comment can still be valuable.

Note that also for Mastodon servers, reply threads are typically not 100% complete except on the original server. (Not sure how it works with Hometown and local-only posts.)

pfefferle commented 10 months ago

So you propose, that it should always be possible to locally reply to an author/editor comment, regardless of it was a reaction to a federated comment (and federated itself) or not?!?

janboddez commented 10 months ago

So you propose, that it should always be possible to locally reply to an author/editor comment, regardless of it was a reaction to a federated comment (and federated itself) or not?!?

I guess so, yes. I see no real reason why it shouldn't be allowed. (Even if that means other servers won't see all replies.)

pfefferle commented 10 months ago

So the only comment that should not replyable (is that a word) locally is a "from the fediverse" comment?!?

janboddez commented 10 months ago

Haha, I don't know ... I'd never really thought about disabling replies to certain comments until I saw this behavior. Which I thought was a bug. :-D


Now wondering how it works with, e.g., Webmention ... (I guess "Salmention" could eventually "relay" new [local or other] replies to the originating site.) ;-P