Skip to content

Sync Bluesky replies as WordPress comments#6

Open
pfefferle wants to merge 2 commits intotrunkfrom
add/comment-sync
Open

Sync Bluesky replies as WordPress comments#6
pfefferle wants to merge 2 commits intotrunkfrom
add/comment-sync

Conversation

@pfefferle
Copy link
Copy Markdown
Member

Fixes #5

Proposed changes:

  • Add Comment_Sync class that polls app.bsky.notification.listNotifications for reply notifications
  • Insert replies as WordPress comments with AT Protocol metadata (_atmosphere_bsky_uri, _atmosphere_bsky_cid, _atmosphere_author_did)
  • Support nested reply threading via comment_parent
  • Deduplicate by checking existing comment meta before inserting
  • Cache author profiles via transients to reduce API calls
  • Register hourly WP-Cron event, cleaned up on deactivation

Other information:

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

Testing instructions:

  • Publish a post to Bluesky via ATmosphere
  • Have someone reply to the post on Bluesky
  • Wait for the hourly cron (or trigger manually via WP-CLI: wp cron event run atmosphere_sync_comments)
  • Verify the reply appears as a WordPress comment with comment_type = atmosphere
  • Verify nested replies set comment_parent correctly
  • Verify duplicate replies are not imported twice

Changelog entry

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

Significance

  • Patch
  • Minor
  • Major

Type

  • 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

Sync Bluesky replies back as WordPress comments.

Poll app.bsky.notification.listNotifications hourly for reply
notifications and insert them as WordPress comments with AT Protocol
metadata. Supports nested reply threading via comment_parent.

Closes #5
@pfefferle pfefferle added the enhancement New feature label Mar 21, 2026
@pfefferle pfefferle self-assigned this Mar 21, 2026
@github-actions github-actions bot added the [Tests] Includes Tests PR includes test changes label Mar 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature [Tests] Includes Tests PR includes test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sync Bluesky replies back as WordPress comments

1 participant