From 78a1872af142447e57e05d8c192ea2fcc2218fc4 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 20 Jan 2026 09:12:06 +0000 Subject: [PATCH] fix(nip-29): use limit 1 for replaceable participant events Kinds 39001 and 39002 are replaceable events with d-tag, so there should only be one valid event of each kind per group. Changed limit from 5 to 1. --- src/lib/chat/adapters/nip-29-adapter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/chat/adapters/nip-29-adapter.ts b/src/lib/chat/adapters/nip-29-adapter.ts index 4bedea7..541ccae 100644 --- a/src/lib/chat/adapters/nip-29-adapter.ts +++ b/src/lib/chat/adapters/nip-29-adapter.ts @@ -194,13 +194,13 @@ export class Nip29Adapter extends ChatProtocolAdapter { const adminsFilter: Filter = { kinds: [39001], "#d": [groupId], - limit: 5, // Should be 1, but allow for duplicates + limit: 1, }; const membersFilter: Filter = { kinds: [39002], "#d": [groupId], - limit: 5, // Should be 1, but allow for duplicates + limit: 1, }; // Use pool.request with both filters to fetch and auto-close on EOSE