mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-05 11:18:24 +00:00
docs: kind-38000 fallback is UnrecognizedKind38000Event
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012CsFEX4ZT8mL1r8h2M6qfH
This commit is contained in:
@@ -158,10 +158,11 @@ Separator legend: **NL** = `joinToString("\n")`, **SP** = `joinToString(" ")`.
|
||||
may hold encrypted private items in `content`, which must never be indexed.
|
||||
|
||||
‡ **Kind 38000 is shared** by NIP-87 mint recommendations and two app formats, and `EventFactory`
|
||||
picks the class by tags: `MintRecommendationEvent` when the first `k` is 38172/38173 (or, with no
|
||||
`k`, a non-blank `u`); else `BallotEvent` on a non-blank `election`; else `PredictionMarketEvent`
|
||||
on a `market`, ≥2 `outcome`s, or `type` + `end`; else a plain, unsearchable `Event` (the spam
|
||||
votes that make up most of the kind). Kind-level probes (`EventFactory.probe`) answer as
|
||||
picks the class by tags: `MintRecommendationEvent` when any `k` is 38172/38173 (or, with no
|
||||
`k`, a non-blank `u` or an `a` to a 38172/38173 address); else `BallotEvent` on a non-blank
|
||||
`election`; else `PredictionMarketEvent` on a `market`, ≥2 `outcome`s, or `type` + `end`; else
|
||||
`UnrecognizedKind38000Event` — addressable (stores still key it by `d`) but unsearchable (the
|
||||
spam votes that make up most of the kind). Kind-level probes (`EventFactory.probe`) answer as
|
||||
`MintRecommendationEvent`. A market's `title()`/`description()` come from its `data` tag JSON,
|
||||
the `title` tag, or JSON `content`, in that order.
|
||||
|
||||
|
||||
@@ -966,8 +966,8 @@ class EventFactory {
|
||||
*
|
||||
* For most kinds that is just [create] with no tags. It is not for kinds whose class is
|
||||
* chosen by tags, where a tagless event can land on a different class than the kind's
|
||||
* real events. Kind 38000 is the case that matters: with no tags it is a plain [Event]
|
||||
* (junk), yet every typed shape of it — mint recommendation, ballot, prediction market —
|
||||
* real events. Kind 38000 is the case that matters: with no tags it is an
|
||||
* [UnrecognizedKind38000Event] (junk, unsearchable), yet every typed shape of it — mint recommendation, ballot, prediction market —
|
||||
* is a searchable, renderable class, so it answers as its primary class. (The other
|
||||
* tag-split kinds, 39005 and 20001, already land on a typed class with no tags.)
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user