Skip to content

Avoid duplicate future feed posts - #730

Merged
akirk merged 2 commits into
mainfrom
fix/future-feed-duplicates
Sep 15, 2026
Merged

akirk merged 2 commits into
mainfrom
fix/future-feed-duplicates

Conversation

@akirk

@akirk akirk commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner

Feed imports now treat scheduled friend posts as existing content when building the remote-post lookup, so future-dated RSS items are not recreated on every refresh before their publish time. URL lookup misses are no longer persisted in the Friends cache, which avoids keeping a stale "not found" result after an item is inserted, and future posts no longer send new-post email notifications before WordPress publishes them.

This addresses feeds that publish entries with future timestamps, such as Terminal Trove, where repeated 15-minute refreshes could create duplicate scheduled posts and duplicate notifications.

Testing:

  • php -l includes/class-user.php
  • php -l includes/class-feed.php
  • php -l includes/class-notifications.php
  • php -l tests/test-feed.php
  • php -l tests/test-notifications.php
  • php ./vendor/squizlabs/php_codesniffer/bin/phpcs includes/class-user.php includes/class-feed.php includes/class-notifications.php tests/test-feed.php tests/test-notifications.php
  • composer test -- --filter 'test_parse_feed_deduplicates_future_posts|test_no_notify_future_post' (fails: missing /tmp/wordpress-tests-lib/includes/functions.php)
  • composer check-cs (fails on pre-existing duplicate-class warnings from .claude/worktrees/show-likes-received)
Changelog
  • Automatically create a changelog entry from the details below

Type

  • Fixed

Message

Prevent duplicate imports and notifications for future-dated feed items.

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 712351f into main Sep 15, 2026
26 checks passed
@akirk
akirk deleted the fix/future-feed-duplicates branch September 15, 2026 14:29
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