fix nip-17 (#305)

* NIP-59 stuff

* nip-17 ios to androing works, android to ios still wip

* fix impl

* ios compat

* default relays for DMs

* delivery ack works

* delivery ack

---------

Co-authored-by: callebtc <93376500+callebtc@users.noreply.github.com>
This commit is contained in:
shroominic
2025-08-24 19:06:29 +02:00
committed by GitHub
co-authored by callebtc
parent 23c397fe7b
commit 47c40fb9f3
11 changed files with 308 additions and 158 deletions
@@ -465,7 +465,8 @@ class BluetoothMeshService(private val context: Context) {
* Uses NoisePayloadType system exactly like iOS SimplifiedBluetoothService
*/
fun sendPrivateMessage(content: String, recipientPeerID: String, recipientNickname: String, messageID: String? = null) {
if (content.isEmpty() || recipientPeerID.isEmpty() || recipientNickname.isEmpty()) return
if (content.isEmpty() || recipientPeerID.isEmpty()) return
if (!recipientPeerID.startsWith("nostr_") && recipientNickname.isEmpty()) return
serviceScope.launch {
val finalMessageID = messageID ?: java.util.UUID.randomUUID().toString()