Skip to content

Don't convert replies to comments without mentions#586

Merged
akirk merged 2 commits intomainfrom
no-comments-without-mentions
Feb 6, 2026
Merged

Don't convert replies to comments without mentions#586
akirk merged 2 commits intomainfrom
no-comments-without-mentions

Conversation

@akirk
Copy link
Owner

@akirk akirk commented Feb 6, 2026

Summary

  • Gate reply-to-comment conversion on the presence of mention-* tags in the friend_tag taxonomy
  • Skip scheduling friends_convert_single_reply cron for replies that don't have friend_mention_tags
  • Add early skipped_no_mention return in process_potential_reply_post() before any remote fetching

This prevents unwanted comments when followed users continue their own threads (e.g., someone replying to themselves) without mentioning the site owner.

Test plan

  • Verify that replies mentioning the site owner are still converted to comments
  • Verify that replies without mentions (e.g., self-threads) remain as friend_post_cache posts

You can test this on WordPress Playground:
https://playground.wordpress.net/#{%22steps%22:[{%22step%22:%22installPlugin%22,%22pluginData%22:{%22resource%22:%22git:directory%22,%22url%22:%22https://github.com/akirk/friends%22,%22ref%22:%22no-comments-without-mentions%22,%22refType%22:%22branch%22},%22options%22:{%22activate%22:true}}]}

akirk and others added 2 commits February 6, 2026 07:21
Replies from followed users that don't mention the site owner (e.g.,
someone continuing their own thread) should not be converted to comments.
Gate both the cron scheduling and the actual conversion on the presence
of mention-* tags in the friend_tag taxonomy.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Test this PR in WordPress Playground

You can test this pull request directly in WordPress Playground:

Launch WordPress Playground

This will install and activate the plugin with the changes from this PR.

@akirk akirk merged commit 3314bbe into main Feb 6, 2026
25 checks passed
@akirk akirk deleted the no-comments-without-mentions branch February 6, 2026 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant