mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-11 00:37:41 +00:00
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:
+5
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user