npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7
|
0b3bed62bf
|
feat(relay): implement NIP-ER event reminder support (kind:30300)
Adds relay-side support for NIP-ER encrypted event reminders:
Write path (ingest):
- Register KIND_EVENT_REMINDER (30300) as parameterized replaceable,
global-only, and UsersWrite-scoped
- Validate not_before tag: exactly one, decimal digits only, no leading
zeros, range 0..=MAX_SAFE_INTEGER
- Reject expiration <= not_before when both are present and parseable
Read path (REQ/COUNT/bridge):
- AUTHOR_ONLY_KINDS array gates visibility — only the authenticated
event author may read kind:30300 events
- Exclusive author-only filters (kinds:[30300]) require authors=[self]
or get CLOSED/403
- Mixed-kind filters pass the gate but per-event filtering silently
omits other authors' reminders
- COUNT fast path disabled when author-only kinds are in play to
prevent leaking aggregate counts
Integration tests (e2e_event_reminder.rs):
- Write validation: valid, missing, duplicate, malformed not_before;
expiration ordering; edge cases (0, MAX_SAFE_INTEGER)
- Read filtering: author self-query, cross-user rejection (HTTP 403
and WS CLOSED), mixed-kind omission, replacement semantics
Signed-off-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
Co-authored-by: Will Pfleger <wpfleger@squareup.com>
Signed-off-by: Will Pfleger <wpfleger@squareup.com>
|
2026-06-11 15:10:01 -04:00 |
|