fix: index poll option text cleanly in ZapPollEvent FTS

ZapPollEvent.indexableContent() concatenated a List onto a String, so
String.plus(Any?) appended the list's toString() — leaking literal "[",
"]" and ", " separators into the full-text index
(e.g. "Best color?[\nOption: Red, \nOption: Blue]"). Build the string
explicitly so only the natural-language poll descriptors are indexed,
matching the buildString style used by the music events.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RFdWREvyvixRXnmNXNzmmN
This commit is contained in:
Claude
2026-06-18 03:48:07 +00:00
parent e1ec0b6823
commit 1bef6ab2ed
@@ -63,7 +63,11 @@ class ZapPollEvent(
AddressHintProvider,
PubKeyHintProvider,
SearchableEvent {
override fun indexableContent() = content + pollOptionsArray().map { "\nOption: " + it.descriptor }
override fun indexableContent() =
buildString {
append(content)
pollOptionsArray().forEach { append("\nOption: ").append(it.descriptor) }
}
override fun eventHints(): List<EventIdHint> {
val eHints = tags.mapNotNull(MarkedETag::parseAsHint)