PlaidWeb / Pushl

Push notification adapter for feeds
MIT License
30 stars 0 forks source link

Handle entry location changes #36

Closed fluffy-critter closed 4 years ago

fluffy-critter commented 4 years ago

Fixes #35

This handles both the case of a shortlink -> permalink redirection changing (i.e. feed URL doesn't change but resolved URL does), and a permalink redirection (i.e. old URL disappears from feed, and the deletion detection sees that it just changed locations instead). In both cases it re-sends all of the webmentions from the old URL to its targets, and it's up to the webmention endpoint to chase the redirections when it verifies the mentions.

Also ended up refactoring the webmention code a bit to reduce the process_entry complexity and to deduplicate the pending task await code.

Tested by running a Publ site on localhost; created an entry with outgoing links to example.com URLs, pung from the feed, changed the entry's URL and added a link, pung from the feed again, then did the same but pinging with -e to the entry's shortlink.