code: async function _storeDeviceKeys(_olmDevice, userStore, deviceResult) {
      if (!deviceResult.keys) {
          // no keys?
          return false;
      }
  
      const deviceId = deviceResult.device_id;
      const userId = deviceResult.user_id;
  
      const signKeyId = "ed25519:" + deviceId;
      const signKey = deviceResult.keys[signKeyId];
      if (!signKey) {
          logger.warn("Device " + userId + ":" + deviceId +
              " has no ed25519 key");
          return false;
      }
  
      const unsigned = deviceResult.unsigned || {};
  
      try {
          await olmlib.verifySignature(_olmDevice, deviceResult, userId, deviceId, signKey);
      } catch (e) {
          logger.warn("Unable to verify signature on device " +
              userId + ":" + deviceId + ":" + e);
          return false;
      }
  
      // DeviceInfo
      let deviceStore;
  
      if (deviceId in userStore) {
          // already have this device.
          deviceStore = userStore[deviceId];
  
          if (deviceStore.getFingerprint() != signKey) {
              // this should only happen if the list has been MITMed; we are
              // best off sticking with the original keys.
              //
              // Should we warn the user about it somehow?
              logger.warn("Ed25519 key for device " + userId + ":" +
                 deviceId + " has changed");
              return false;
          }
      } else {
          userStore[deviceId] = deviceStore = new DeviceInfo(deviceId);
      }
  
      deviceStore.keys = deviceResult.keys || {};
      deviceStore.algorithms = deviceResult.algorithms || [];
      deviceStore.unsigned = unsigned;
      return true;
  }
docs: /*
  Process a device in a /query response, and add it to the userStore
  
  returns (a promise for) true if a change was made, else false