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.
This commit is contained in:
Claude
2026-01-20 09:12:06 +00:00
parent 11e75ce5f5
commit 78a1872af1

View File

@@ -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