async write_addEncryptedFileKeys(hash, keys) {
        let path = keysPath + hash;

        let json = await readJsonFile(path);

        //don't add duplicates
        let users = json.fileKeys.map(k => k.user);
        keys = keys.filter(k => users.indexOf(k.user) === -1);

        json.fileKeys = json.fileKeys.concat(keys);

        await writeJson(path, json);
        await updateFeed();
    }
/**
   * Adds encrypted file keys to IPFS
   * @param hash
   * @param keys array of objects with user, sender, encryptedFileKey
   * @returns {Promise<void>}
   */
Adds encrypted file keys to IPFS
@param hash
@param keys array of objects with user, sender, encryptedFileKey
@returns {Promise}
Adds encrypted file keys to IPFS @param hash @param keys array of objects with user sender encryptedFileKey @returns { Promise }
async write_addEncryptedFileKeys(hash, keys) {
        let path = keysPath + hash;
        let json = await readJsonFile(path);
        let users = json.fileKeys.map(k => k.user);
        keys = keys.filter(k => users.indexOf(k.user) === -1);
        json.fileKeys = json.fileKeys.concat(keys);
        await writeJson(path, json);
        await updateFeed();
    }
async write_addEncryptedFileKeys ( hash , keys ) { let path = keysPath + hash ; let json = await readJsonFile ( path ) ; let users = json . fileKeys . map ( k => k . user ) ; keys = keys . filter ( k => users . indexOf ( k . user ) === - 1 ) ; json . fileKeys = json . fileKeys . concat ( keys ) ; await writeJson ( path , json ) ; await updateFeed ( ) ; }
Adds encrypted file keys to IPFS
 @param hash
 @param keys array of objects with user, sender, encryptedFileKey
 @returns {Promise<void>}
Adds encrypted file keys to IPFS @param hash @param keys array of objects with user sender encryptedFileKey @returns { Promise<void > }
//don't add duplicates