I ended up doing this:
{
"@context": "https://www.w3.org/ns/activitystreams",
"type": "Tombstone",
"formerType": "Note",
"url": "http://smithereen.local:8080/posts/114",
"id": "http://smithereen.local:8080/posts/114",
"inReplyTo": "http://smithereen.local:8080/posts/113",
"replies": {
"id": "http://smithereen.local:8080/posts/114/replies",
"type": "Collection",
"first": {
"next": "http://smithereen.local:8080/posts/114/replies?offset=0&count=50",
"partOf": "http://smithereen.local:8080/posts/114/replies",
"type": "CollectionPage",
"items": []
}
}
}
If a post gets deleted, either locally or by a Delete
activity, and there are replies to it, I don’t delete the DB row completely but rather null most of it, keeping the fields needed to keep the thread intact.