Copies to Clipboard the GiftWrap ID and not the inner message ID
This commit is contained in:
@@ -72,7 +72,22 @@ open class Note(val idHex: String) {
|
|||||||
open fun idNote() = id().toNote()
|
open fun idNote() = id().toNote()
|
||||||
|
|
||||||
open fun toNEvent(): String {
|
open fun toNEvent(): String {
|
||||||
return Nip19.createNEvent(idHex, author?.pubkeyHex, event?.kind(), relays.firstOrNull())
|
val myEvent = event
|
||||||
|
return if (myEvent is WrappedEvent) {
|
||||||
|
val host = myEvent.host
|
||||||
|
if (host != null) {
|
||||||
|
Nip19.createNEvent(
|
||||||
|
host.id,
|
||||||
|
host.pubKey,
|
||||||
|
host.kind(),
|
||||||
|
relays.firstOrNull()
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
Nip19.createNEvent(idHex, author?.pubkeyHex, event?.kind(), relays.firstOrNull())
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Nip19.createNEvent(idHex, author?.pubkeyHex, event?.kind(), relays.firstOrNull())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun toNostrUri(): String {
|
fun toNostrUri(): String {
|
||||||
|
|||||||
Reference in New Issue
Block a user