Skip to content

merge and delete posts

When the same idea comes in twice, you do not want to abandon either thread. Merging keeps the conversation in one place without losing votes.

To merge, pick a target post (the survivor) and one or more source posts to fold into it.

What spirby does:

  • votes: every vote on a source moves to the target. If the same person voted on both, the duplicate is dropped, one vote per person, always. Anonymous voters dedupe by email hash; signed-in voters dedupe by user id.
  • comments: every comment on a source moves to the target. Threading survives because comment parent ids reference comment ids, not post ids.
  • status: each source flips to duplicate and gets a redirect link to the target. If a source was already merged into something else, that chain is rewritten to point at the new target so the public redirect is always one hop.
  • counters: the target’s vote count and comment count are recomputed from the moved rows.

Constraints:

  • you cannot merge a post into itself
  • sources and target must be on the same board
  • already-deleted or already-merged posts cannot be sources
  • up to 20 sources per merge

The whole operation runs in a single database transaction, so a partial failure rolls everything back.

Posts are soft-deleted: they get a deleted_at timestamp and disappear from every list, public and admin. The row, the comments, and the votes stay in the database. There is no undelete in the ui yet.

Use delete for spam that slipped through moderation, or for anything you do not want to keep around. For duplicates, prefer merge, it preserves the votes.