Unpublishing a post doesn't delete federated post
Describe the bug
Kind of the opposite of #9 - when a post is deleted on Writefreely, it is correctly deleted from the federated feed (my view on Mastodon). However, moving a post from published to draft status does not delete the federated post, and when the post is moved back from draft to published, the federated post stays- and now has the wrong URL!
Steps to reproduce (if necessary)
Steps to reproduce the behavior:
- Create a post
- Publish it
- Look at the federated feed on Mastodon or whatever and notice the post
- Move the post from published to draft
- Notice that the post is still there on the federated feed, but the link now 404s
- Move the post from draft back to published
- The link may still work, but if the URL was regenerated, there's now a broken link in the federated feed that you have to delete the post to fix.
My feed at @[email protected] shows the issue- the post for Happy Camper Pt. 3 links to https://perfect.hypnovir.us/happy-camper-pt-78pl, while the correct link is now (link is NSFW if your boss has my fetishes): https://perfect.hypnovir.us/happy-camper-pt-k15s
Expected behavior
Moving a post to draft should delete the corresponding federated post.
Application configuration
- Single mode or Multi-user mode? Single
- Database? [mysql/sqlite] sqlite
- Open registration? [yes/no] no
- Federation enabled? [yes/no] yes
Version or last commit:
./writefreely -v prints:
WriteFreely **0.10.0**
Thanks for the report! This is indeed something we'll want to fix.
We're also tracking the issue in T535 -- see that task and this comment on #79 for details on roadblocks and potential routes toward a fix.
Thank you. For what it's worth, I think the best option is simply to delete the federated post on unpublish and create a new post on publish, since it's the only way to ensure you don't get a phantom post with a broken link.
The other route is something like "delete the post if it'll be republished with a different URL, and leave it otherwise", but that's a pretty weird and unintuitive behavior.