nostrrelay/relay
Patrick Mulligan dcc3204735 Fix NIP-09 deletion for parameterized replaceable events (NIP-33)
Fixed bug where deleting a parameterized replaceable event (e.g., kind 31922)
using an 'a' tag would incorrectly delete ALL events of that kind instead of
just the specific event with the matching d-tag.

**Root Cause:**
NostrFilter's 'd' field uses a Pydantic Field alias "#d". When creating a filter
with `NostrFilter(d=[value])`, Pydantic ignores it because the parameter name
doesn't match the alias.

**Fix:**
Changed filter creation to use the alias:
```python
NostrFilter(authors=[...], kinds=[...], **{"#d": [d_tag]})
```

**Testing:**
- Created two tasks with different d-tags
- Deleted only one task
- Verified only the specified task was marked as deleted in the database
- Confirmed the other task remained unaffected

This ensures proper NIP-09 deletion behavior for NIP-33 parameterized
replaceable events using 'a' tag format (kind:pubkey:d-identifier).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-17 00:01:21 +01:00
..
__init__.py refactor: extract client_connection 2023-02-17 14:44:39 +02:00
client_connection.py Fix NIP-09 deletion for parameterized replaceable events (NIP-33) 2025-11-17 00:01:21 +01:00
client_manager.py chore: add uv, linting, fixes (#39) 2025-10-30 10:43:27 +01:00
event.py refactor: get rid of secp lib (#40) 2025-11-04 10:30:43 +02:00
event_validator.py chore: add uv, linting, fixes (#39) 2025-10-30 10:43:27 +01:00
filter.py chore: add uv, linting, fixes (#39) 2025-10-30 10:43:27 +01:00
relay.py chore: add uv, linting, fixes (#39) 2025-10-30 10:43:27 +01:00