Index I/i tags

This commit is contained in:
Alex Gleason 2025-06-01 19:45:36 -05:00
parent 96799d1918
commit 24d27c4cdd
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -82,14 +82,16 @@ export class DittoPgStore extends NPostgres {
static tagConditions: Record<string, TagCondition> = {
'A': ({ count }) => count === 0,
'E': ({ count, value }) => count === 0 && isNostrId(value),
'I': ({ count }) => count === 0,
'K': ({ count, value }) => count === 0 && Number.isInteger(Number(value)),
'L': ({ event, count }) => event.kind === 1985 || count === 0,
'P': ({ count, value }) => count === 0 && isNostrId(value),
'a': ({ count }) => count < 15,
'client': ({ count, value }) => count === 0 && value.length < 50,
'd': ({ event, count }) => count === 0 && NKinds.parameterizedReplaceable(event.kind),
'e': DittoPgStore.eTagCondition,
'i': ({ count }) => count < 15,
'k': ({ count }) => count < 3,
'L': ({ event, count }) => event.kind === 1985 || count === 0,
'l': ({ event, count }) => event.kind === 1985 || count === 0,
'n': ({ count, value }) => count < 50 && value.length < 50,
'p': DittoPgStore.pTagCondition,