Skip to content

Conversation

@tompro
Copy link
Collaborator

@tompro tompro commented Oct 22, 2025

Marks previous replaceable events as deleted when a new one is insterted

@tompro tompro requested review from Copilot and zupzup October 22, 2025 13:10
@tompro tompro self-assigned this Oct 22, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements cleanup logic for replaceable Nostr events by marking previous events as deleted when a new replaceable event is inserted. According to the Nostr protocol, replaceable events should supersede earlier events from the same author with the same kind.

Key Changes:

  • Added automatic deletion of older replaceable events after successfully saving a new one
  • Uses a filter to identify and delete events from the same author with the same kind and earlier timestamps

Copy link

@zupzup zupzup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM 👍

@tompro tompro merged commit e36dc9e into master Oct 22, 2025
4 checks passed
@tompro tompro deleted the cleanup-replaceable-events branch October 22, 2025 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants