Merge pull request #640 from greenart7c3/encryption_amber

try to fix messages being encrypted twice using amber
pull/641/head
Vitor Pamplona 2023-10-09 12:14:13 -04:00 zatwierdzone przez GitHub
commit dd2e590475
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 2 dodań i 0 usunięć

Wyświetl plik

@ -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)