try to fix messages being encrypted twice

This commit is contained in:
greenart7c3
2023-10-09 11:38:29 -03:00
parent 275051ed30
commit 5bc4aab8d8
@@ -274,6 +274,8 @@ object ExternalSignerUtils {
}
fun encrypt(decryptedContent: String, pubKey: HexKey, id: String, signerType: SignerType = SignerType.NIP04_ENCRYPT) {
content.remove(id)
cachedDecryptedContent.remove(id)
val result = getDataFromResolver(signerType, arrayOf(decryptedContent, pubKey))
if (result !== null) {
content.put(id, result)