Fixes merge issue on NIP24 TextNotes

This commit is contained in:
Vitor Pamplona
2023-09-18 11:23:36 -04:00
parent f6496b5e7e
commit 274e4f7498

View File

@@ -91,7 +91,7 @@ class NIP24Factory {
fun createTextNoteNIP24( fun createTextNoteNIP24(
msg: String, msg: String,
to: List<HexKey>, to: List<HexKey>,
from: ByteArray, keyPair: KeyPair,
replyTos: List<String>? = null, replyTos: List<String>? = null,
mentions: List<String>? = null, mentions: List<String>? = null,
addresses: List<ATag>?, addresses: List<ATag>?,
@@ -104,11 +104,11 @@ class NIP24Factory {
zapRaiserAmount: Long? = null, zapRaiserAmount: Long? = null,
geohash: String? = null geohash: String? = null
): List<GiftWrapEvent> { ): List<GiftWrapEvent> {
val senderPublicKey = CryptoUtils.pubkeyCreate(from).toHexKey() val senderPublicKey = keyPair.pubKey.toHexKey()
val senderMessage = TextNoteEvent.create( val senderMessage = TextNoteEvent.create(
msg = msg, msg = msg,
privateKey = from, keyPair = keyPair,
replyTos = replyTos, replyTos = replyTos,
mentions = mentions, mentions = mentions,
zapReceiver = zapReceiver, zapReceiver = zapReceiver,
@@ -127,7 +127,7 @@ class NIP24Factory {
event = SealedGossipEvent.create( event = SealedGossipEvent.create(
event = senderMessage, event = senderMessage,
encryptTo = it, encryptTo = it,
privateKey = from privateKey = keyPair.privKey!!
), ),
recipientPubKey = it recipientPubKey = it
) )