Uses NIP-22 to reply to Highlights

This commit is contained in:
Vitor Pamplona 2025-03-06 16:25:57 -05:00
parent fa9ff0c52a
commit 52e67c9ab6

View File

@ -29,6 +29,7 @@ import com.vitorpamplona.quartz.nip01Core.tags.events.firstTaggedEvent
import com.vitorpamplona.quartz.nip01Core.tags.people.firstTaggedUser
import com.vitorpamplona.quartz.nip01Core.tags.references.ReferenceTag
import com.vitorpamplona.quartz.nip10Notes.BaseThreadedEvent
import com.vitorpamplona.quartz.nip22Comments.RootScope
import com.vitorpamplona.quartz.nip31Alts.AltTag
import com.vitorpamplona.quartz.nip84Highlights.tags.ContextTag
import com.vitorpamplona.quartz.utils.TimeUtils
@ -41,7 +42,8 @@ class HighlightEvent(
tags: Array<Array<String>>,
content: String,
sig: HexKey,
) : BaseThreadedEvent(id, pubKey, createdAt, KIND, tags, content, sig) {
) : BaseThreadedEvent(id, pubKey, createdAt, KIND, tags, content, sig),
RootScope {
fun inUrl() = tags.firstNotNullOfOrNull(ReferenceTag::parse)
fun author() = firstTaggedUser()