Skip to content

Commit 89134d3

Browse files
authored
Merge pull request #394 from andotherstuff/dont-embed-deleted
Don't embed removed posts
2 parents f979f9d + 997e631 commit 89134d3

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

NIP.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,9 @@ Moderator approval events for posts as specified in NIP-72.
152152
- `["p", authorPubkey]` - References the post author
153153
- `["k", originalKind]` - Kind of the original post
154154

155+
**Content:**
156+
The content field can be left blank or optionally include a moderation reason.
157+
155158
**Example:**
156159
```json
157160
{
@@ -164,7 +167,7 @@ Moderator approval events for posts as specified in NIP-72.
164167
["p", "post_author_pubkey"],
165168
["k", "1"]
166169
],
167-
"content": "{\"kind\":1,\"pubkey\":\"post_author_pubkey\",\"created_at\":1234567880,\"tags\":[[\"a\",\"34550:community_creator_pubkey:bitcoin-discussion\"]],\"content\":\"This post was removed\",\"id\":\"removed_post_id\",\"sig\":\"signature\"}"
170+
"content": "Removed for violating community guidelines"
168171
}
169172
```
170173

src/components/groups/PostList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ function PostItem({ post, communityId, isApproved, isModerator, isLastItem = fal
615615
await publishEvent({
616616
kind: KINDS.GROUP_POST_REMOVAL,
617617
tags: [["a", communityId], ["e", post.id], ["p", post.pubkey], ["k", String(post.kind)]],
618-
content: JSON.stringify({ reason: "Removed by moderator", timestamp: Date.now(), post: post }),
618+
content: "", // Empty content - do not redistribute removed content
619619
});
620620
toast.success("Post removed successfully!");
621621
setIsRemoveDialogOpen(false);

src/hooks/useReportActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export function useReportActions() {
7979
["p", pubkey],
8080
["k", postKind]
8181
],
82-
content: JSON.stringify(post), // Include the full post event as JSON
82+
content: "", // Empty content - do not redistribute removed content
8383
});
8484

8585
// Also publish a separate event with the reason if provided

0 commit comments

Comments
 (0)