writefreely / writefreely/writefreely

Unpublishing a post doesn't delete federated post

Open
#134 2 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug federation
Dominant language
Go
Stars
5.3k
Forks
398
PR merge metrics
No merged PRs in 30d

Description

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:

  1. Create a post
  2. Publish it
  3. Look at the federated feed on Mastodon or whatever and notice the post
  4. Move the post from published to draft
  5. Notice that the post is still there on the federated feed, but the link now 404s
  6. Move the post from draft back to published
  7. 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 @PrincessGrace@perfect.hypnovir.us 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**

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files or tests are named. Start by tracing the post status transition and its federation handling, then reproduce the published-to-draft flow against a Mastodon feed; done means moving a post to draft removes its corresponding federated post and avoids the stale URL described here.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.