Fix Atom & RSS id fields and incorrect use of slug #10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch fixes the misuse of atom IDs throughout the feed.
In Atom, the IDs of feeds and entries should not change, otherwise the aggregator will treat the renamed entity as another one.
The IDs of feeds and entries must indeed be some sort of URI, so using an URL is convenient. But using the slug URL is not a good idea as it can change if the discussion is renamed. So now it uses URLs without the slugs for each feed and entries.
This is done by explicitly set the ID as another field than the link.
This change also fixes the
link
property ofatom/d/<ID>
feeds which had the ID doubled.Here is an exemple diff of the changes this produces:
As stated above, modifying the ID will cause the aggregator to double the entries, so this will be the case after this change is merged. But only once 🙂.