Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle entry location changes #36

Merged
merged 1 commit into from
Dec 2, 2019

Conversation

fluffy-critter
Copy link
Contributor

@fluffy-critter fluffy-critter commented Dec 2, 2019

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.

Fixes #212

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.

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.
@fluffy-critter fluffy-critter merged commit 05e31f4 into master Dec 2, 2019
@fluffy-critter fluffy-critter deleted the feature/35-redirection-source branch December 2, 2019 03:06
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.

Handle source redirection
1 participant