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

Feature Request: Tag a user by default

Open ethicalrevolution opened this issue 1 year ago • 2 comments

What

I’m trying to tag a group in order that my posts made on Wordpress automatically publish to that group.

Specifically: If I make a post from Mastodon and tag @[email protected] then my post gets sent out to anybody who follows the Spurs Group. I am trying to perform the same action but from my Wordpress account. I’ve tried adding all of the following in the ‘Post Content’ section of the ActivityPub settings in Wordpress but none of them successfully tag the account:

<a href="/@[email protected]">@[email protected]</a>
<a href="https://a.gup.pe/u/spurs">@[email protected]</a>
<a href="https://a.gup.pe/@spurs">@[email protected]</a>

Is there a current work around to be able to automatically tag another Fediverse user account? If not then could I make this a feature request?

Why

I have created a website specifically to post updates to a Guppe group on Mastodon, so I need to be able to tag the Guppe group account in order for it to be shared to the members of the group.

How

By having the correct tag in the penultimate line of this screenshot. IMG_2231

ethicalrevolution avatar Aug 01 '24 15:08 ethicalrevolution

I’ve managed a workaround for this by adding the following code to my functions.php file:

/** always tag spurs group */

add_filter( 'the_content', 'filter_the_content_in_the_main_loop' );

function filter_the_content_in_the_main_loop( $content ) {

// Check if we're inside the main loop in a single post page.
if ( is_single() && in_the_loop() && is_main_query() ) {

   return esc_html__("@[email protected]").$content;
}

return $content;

}

ethicalrevolution avatar Aug 17 '24 05:08 ethicalrevolution

Bah, turns out the functions fix only works for new posts, but not for replies to existing posts using the ActivityPub plugin 'reply from' bookmarklet.

ethicalrevolution avatar Aug 18 '24 11:08 ethicalrevolution

This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] avatar Apr 02 '25 02:04 github-actions[bot]