wordpress-activitypub icon indicating copy to clipboard operation
wordpress-activitypub copied to clipboard

Comment: Send announce for all new comments

Open pfefferle opened this issue 9 months ago • 4 comments

Supersedes #1515 and fixes #1001

Proposed changes:

  • Stores the Activity in the Comment-Meta, because we have to get sure, that the comment will be approved or not before announcing it
  • Hook into approve process, to late federate the Announce

Other information:

  • [x] Have you written new tests for your changes, if applicable?

Testing instructions:

  • Apply this change to a WP test site that's accessible online.
  • Comment on a post from a fediverse instance of your choice.
  • Check the Outbox and make sure it created an Announce activity.

Changelog entry

  • [X] Automatically create a changelog entry from the details below.
Changelog Entry Details

Significance

  • [ ] Patch
  • [X] Minor
  • [ ] Major

Type

  • [X] Added - for new features
  • [ ] Changed - for changes in existing functionality
  • [ ] Deprecated - for soon-to-be removed features
  • [ ] Removed - for now removed features
  • [ ] Fixed - for any bug fixes
  • [ ] Security - in case of vulnerabilities

Message

Incoming interactions create an Announce activity so other instances get notified about it.

pfefferle avatar Apr 10 '25 11:04 pfefferle

Some thoughts:

  1. As far as I understand, comment synchronization seems to rely on the group actor’s Announce activity. What happens if the group actor does not exist in a given implementation?

  2. What about comments whose visibility is not public — for example, those visible only to followers or mentioned users? Should such comments still be federated to unrelated servers, or should delivery be restricted only to the intended audience’s inboxes?

  3. In Misskey, all comments can be browsed regardless of context — isn’t this simply a design limitation of Lemmy? As far as I know, in the Fediverse, it’s actually normal behavior that not all comments are federated, depending on visibility or thread scope.

  4. For WordPress-to-WordPress comment synchronization, which model would be more appropriate — a push model, a pull model, or something similar to RSS polling?

  5. Personally, I find the current group actor model somewhat spammy. It doesn’t really improve feed readability, and often makes threads harder to follow.


As you know, I don’t think a blog profile is suitable as a group actor, since it isn’t a forum-type entity. Wouldn’t it make more sense to discuss federation with Lemmy after a proper forum profile is implemented in WordPress?

After all, Lemmy’s post type is based on Page, and since Page inherits the properties of a Document, it could potentially conflict with WordPress’s media library or related document structures.

Jiwoon-Kim avatar Oct 24 '25 07:10 Jiwoon-Kim

By the way, has Lemmy’s WebFinger ambiguity issue been resolved? https://socialhub.activitypub.rocks/t/are-actors-and-webfingers-1-to-1/4539

Lemmy is a good example here, as users and communities may in fact use the same name, and the WebFinger is therefore ambiguous as to whether you meant the user or the community.

Wouldn’t a conflict occur in WordPress if the blog profile handle and the user profile handle are identical?

Jiwoon-Kim avatar Oct 24 '25 08:10 Jiwoon-Kim

I have a simple proposal to improve the Group Actor model:

  1. If a Group Actor is treated entirely as a forum, then even when an object's visibility is public, make it so that a Person Actor sends a Create activity targeting only that specific Group Actor. The Group Actor can then announce the post via an Announce activity. This ensures that if other users do not follow the forum, the object will generally not appear in their feeds.

  2. Prevent Group Actors from announcing comments. This clutters the feed unnecessarily. Federated comments should be synchronized differently — for example, through the context of the top-level post.

Jiwoon-Kim avatar Oct 24 '25 10:10 Jiwoon-Kim

A few trust and safety questions:

  • If a benign comment is approved, and later edited will it return to moderation?
  • Is there a notification for status updates?
  • Is there a mechanism to undo an Announce?

If not, this could become a spam or misinfo vector.

I understand the desire to bootstrap WP federation, but I think Announces might best be left to author/editor control.

mediaformat avatar Oct 31 '25 05:10 mediaformat