nostrmarket/nostr
Padreug 50f87c9970
Some checks failed
ci.yml / fix(nip17): drop `since` filter on kind 1059 subscription (pull_request) Failing after 0s
ci.yml / fix(nip17): drop `since` filter on kind 1059 subscription (push) Failing after 0s
fix(nip17): drop since filter on kind 1059 subscription
NIP-59 randomizes gift wrap created_at up to 2 days into the past so
metadata observers can't correlate publish moments. The lenient
`since = last_dm_time - 5min` window from commit e0fdada was designed
for NIP-04 messages where created_at is the real send time; with
gift wraps it locks out any wrap whose randomized timestamp falls
before the latest stored DM.

aio-demo symptom: established merchant (last_dm_time = today 14:40)
subscribes with `since = today 14:35`. Customer publishes a new gift
wrap whose randomized created_at is May 1 23:11. NostrFilter.matches
sees `event.created_at < self.since` and returns False — relay logs
" Filter didn't match" and the order never reaches the merchant.

Fix: don't apply `since` at all on the kind 1059 filter. Replay risk
is bounded by server-side dedup and our existing
NostrClient.is_duplicate_event() guard. Other filters (stalls,
products, profiles) keep their `since` because those events use
real timestamps.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-03 17:41:30 +02:00
..
event.py chore: get rid of secp lib (#114) 2025-11-04 10:34:24 +01:00
nip44.py Replace NIP-04 messaging with NIP-17 (NIP-44 + NIP-59 gift wrapping) 2026-05-03 16:59:03 +02:00
nip59.py Replace NIP-04 messaging with NIP-17 (NIP-44 + NIP-59 gift wrapping) 2026-05-03 16:59:03 +02:00
nostr_client.py fix(nip17): drop since filter on kind 1059 subscription 2026-05-03 17:41:30 +02:00