docs: public void updateKeys(XMPPConnection connection, PublicKeysListElement metadata)
              throws InterruptedException, SmackException.NotConnectedException, SmackException.NoResponseException,
              IOException {
  
          Map<OpenPgpV4Fingerprint, Date> fingerprintsAndDates = new HashMap<>();
          for (OpenPgpV4Fingerprint fingerprint : metadata.getMetadata().keySet()) {
              fingerprintsAndDates.put(fingerprint, metadata.getMetadata().get(fingerprint).getDate());
          }
  
          store.setAnnouncedFingerprintsOf(getJid(), fingerprintsAndDates);
          Map<OpenPgpV4Fingerprint, Date> fetchDates = store.getPublicKeyFetchDates(getJid());
  
          for (OpenPgpV4Fingerprint fingerprint : metadata.getMetadata().keySet()) {
              Date fetchDate = fetchDates.get(fingerprint);
              if (fetchDate != null && fingerprintsAndDates.get(fingerprint) != null && fetchDate.after(fingerprintsAndDates.get(fingerprint))) {
                  LOGGER.log(Level.FINE, "Skip key " + Long.toHexString(fingerprint.getKeyId()) + " as we already have the most recent version. " +
                          "Last announced: " + fingerprintsAndDates.get(fingerprint).toString() + " Last fetched: " + fetchDate.toString());
                  continue;
              }
              try {
                  PubkeyElement key = OpenPgpPubSubUtil.fetchPubkey(connection, getJid(), fingerprint);
                  unfetchableKeys.remove(fingerprint);
                  fetchDates.put(fingerprint, new Date());
                  if (key == null) {
                      LOGGER.log(Level.WARNING, "Public key " + Long.toHexString(fingerprint.getKeyId()) +
                              " can not be imported: Is null");
                      unfetchableKeys.put(fingerprint, new NullPointerException("Public key is null."));
                      continue;
                  }
                  PGPPublicKeyRing keyRing = new PGPPublicKeyRing(Base64.decode(key.getDataElement().getB64Data()), new BcKeyFingerprintCalculator());
                  store.importPublicKey(getJid(), keyRing);
              } catch (PubSubException.NotAPubSubNodeException | PubSubException.NotALeafNodeException |
                      XMPPException.XMPPErrorException e) {
                  LOGGER.log(Level.WARNING, "Error fetching public key " + Long.toHexString(fingerprint.getKeyId()), e);
                  unfetchableKeys.put(fingerprint, e);
              } catch (PGPException | IOException e) {
                  LOGGER.log(Level.WARNING, "Public key " + Long.toHexString(fingerprint.getKeyId()) +
                          " can not be imported.", e);
                  unfetchableKeys.put(fingerprint, e);
              } catch (MissingUserIdOnKeyException e) {
                  LOGGER.log(Level.WARNING, "Public key " + Long.toHexString(fingerprint.getKeyId()) +
                          " is missing the user-id \"xmpp:" + getJid() + "\". Refuse to import it.", e);
                  unfetchableKeys.put(fingerprint, e);
              }
          }
          store.setPublicKeyFetchDates(getJid(), fetchDates);
      }