js: fix getkeys with locate option
authorMaximilian Krambach <maximilian.krambach@intevation.de>
Tue, 17 Jul 2018 09:07:49 +0000 (11:07 +0200)
committerMaximilian Krambach <maximilian.krambach@intevation.de>
Tue, 17 Jul 2018 09:07:49 +0000 (11:07 +0200)
--

* src/Keyring.js:
  As locate will not work with the "secret" option, the first message
  cannot be reused, thus a new one must be created here

lang/js/src/Keyring.js

index cefc812..f2a7138 100644 (file)
@@ -68,8 +68,10 @@ export class GPGME_Keyring {
                     let secondrequest;
                     if (prepare_sync === true) {
                         secondrequest = function() {
-                            msg.setParameter('secret', true);
-                            return msg.post();
+                            let msg2 = createMessage('keylist');
+                            msg2.setParameter('keys', pattern);
+                            msg2.setParameter('secret', true);
+                            return msg2.post();
                         };
                     } else {
                         secondrequest = function() {