From 2fa4281b6f03f616e6b17fd6569db63baded68a4 Mon Sep 17 00:00:00 2001 From: greenart7c3 Date: Sat, 16 Sep 2023 09:11:25 -0300 Subject: [PATCH] fix sending messages --- .../main/java/com/vitorpamplona/amethyst/model/Account.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt b/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt index 056cf04c6..288d42386 100644 --- a/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt +++ b/app/src/main/java/com/vitorpamplona/amethyst/model/Account.kt @@ -1388,7 +1388,7 @@ class Account( } fun sendChannelMessage(message: String, toChannel: String, replyTo: List?, mentions: List?, zapReceiver: List? = null, wantsToMarkAsSensitive: Boolean, zapRaiserAmount: Long? = null, geohash: String? = null) { - if (!isWriteable()) return + if (!isWriteable() && !loginWithAmber) return // val repliesToHex = listOfNotNull(replyingTo?.idHex).ifEmpty { null } val repliesToHex = replyTo?.map { it.idHex } @@ -1420,7 +1420,7 @@ class Account( } fun sendLiveMessage(message: String, toChannel: ATag, replyTo: List?, mentions: List?, zapReceiver: List? = null, wantsToMarkAsSensitive: Boolean, zapRaiserAmount: Long? = null, geohash: String? = null) { - if (!isWriteable()) return + if (!isWriteable() && !loginWithAmber) return // val repliesToHex = listOfNotNull(replyingTo?.idHex).ifEmpty { null } val repliesToHex = replyTo?.map { it.idHex } @@ -1456,7 +1456,7 @@ class Account( } fun sendPrivateMessage(message: String, toUser: HexKey, replyingTo: Note? = null, mentions: List?, zapReceiver: List? = null, wantsToMarkAsSensitive: Boolean, zapRaiserAmount: Long? = null, geohash: String? = null) { - if (!isWriteable()) return + if (!isWriteable() && !loginWithAmber) return val repliesToHex = listOfNotNull(replyingTo?.idHex).ifEmpty { null } val mentionsHex = mentions?.map { it.pubkeyHex }