display note1 codes.

This commit is contained in:
fiatjaf 2023-03-30 11:21:23 -03:00
parent b94219512f
commit f26b6ab697
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1

View File

@ -55,6 +55,13 @@ object Components {
"nevent", "nevent",
NIP19.encode(EventPointer(bytes32.toHex)) NIP19.encode(EventPointer(bytes32.toHex))
) )
),
div(
cls := "pl-2 mb-2",
entry(
"note",
NIP19.encode(bytes32)
)
) )
) )
@ -70,7 +77,8 @@ object Components {
evp.author.map { pk => evp.author.map { pk =>
entry("author hint (pubkey hex)", pk.value.toHex) entry("author hint (pubkey hex)", pk.value.toHex)
}, },
nip19_21("nevent", NIP19.encode(evp)) nip19_21("nevent", NIP19.encode(evp)),
entry("note", NIP19.encode(ByteVector32.fromValidHex(evp.id)))
) )
def renderProfilePointer( def renderProfilePointer(
@ -194,7 +202,18 @@ object Components {
case true => "yes"; case false => "no" case true => "yes"; case false => "no"
} }
), ),
event.id.map(id => nip19_21("nevent", NIP19.encode(EventPointer(id)))) event.id.map(id =>
nip19_21(
"nevent",
NIP19.encode(EventPointer(id, author = event.pubkey))
)
),
event.id.map(id =>
entry(
"note",
NIP19.encode(ByteVector32.fromValidHex(id))
)
)
) )
private def entry( private def entry(