diff --git a/src/plugin/jamipluginmanager.cpp b/src/plugin/jamipluginmanager.cpp index 72ddf46f6ae9ff9923e4a283898f8305fa849ffd..b33632f32565c2b0895d8a39a1c7fe65d9bf050a 100644 --- a/src/plugin/jamipluginmanager.cpp +++ b/src/plugin/jamipluginmanager.cpp @@ -86,7 +86,7 @@ JamiPluginManager::getPluginDetails(const std::string& rootPath, bool reset) itImage->second.insert(0, rootPath + DIR_SEPARATOR_CH + "data" + DIR_SEPARATOR_CH); details["soPath"] = rootPath + DIR_SEPARATOR_CH + LIB_PREFIX + details["id"] + LIB_TYPE; - details["author"] = getPluginAuthor(rootPath, details["name"]); + details["author"] = getPluginAuthor(rootPath, details["id"]); detailsIt = pluginDetailsMap_.emplace(rootPath, std::move(details)).first; return detailsIt->second; } @@ -143,7 +143,7 @@ JamiPluginManager::checkPluginSignatureFile(const std::string& jplPath) try { auto signatures = PluginUtils::readPluginSignatureFromArchive(jplPath); auto manifest = PluginUtils::readPluginManifestFromArchive(jplPath); - const std::string& name = manifest["name"]; + const std::string& name = manifest["id"]; auto filesPath = archiver::listFilesFromArchive(jplPath); for (const auto& file : filesPath) { // we skip the signatures and signatures.sig file @@ -225,7 +225,7 @@ JamiPluginManager::installPlugin(const std::string& jplPath, bool force) if (std::filesystem::is_regular_file(jplPath)) { try { auto manifestMap = PluginUtils::readPluginManifestFromArchive(jplPath); - const std::string& name = manifestMap["name"]; + const std::string& name = manifestMap["id"]; if (name.empty()) return INVALID_PLUGIN; auto cert = checkPluginCertificate(jplPath, force); @@ -294,7 +294,7 @@ JamiPluginManager::uninstallPlugin(const std::string& rootPath) for (const auto& accId : jami::Manager::instance().getAccountList()) dhtnet::fileutils::removeAll(fileutils::get_data_dir() + DIR_SEPARATOR_CH + accId + DIR_SEPARATOR_CH + "plugins" + DIR_SEPARATOR_CH - + detailsIt->second.at("name")); + + detailsIt->second.at("id")); pluginDetailsMap_.erase(detailsIt); } return dhtnet::fileutils::removeAll(rootPath); diff --git a/src/plugin/jamipluginmanager.h b/src/plugin/jamipluginmanager.h index aac8054b1b469511368fd9484861b7e078ff0ae1..b8812dc702b2ace83fcff6c1b40df0bbe703b577 100644 --- a/src/plugin/jamipluginmanager.h +++ b/src/plugin/jamipluginmanager.h @@ -70,7 +70,7 @@ public: * @param reset If true, overrides previous details values * Reset is only used in the UT for now, but it can be useful * if we want to reset plugins language without restarting the application - * @return Map where the keyset is {"id", "name", "description", "version", "iconPath", "imagePath","soPath"} + * @return Map where the keyset is {"id", "name", "description", "version", "iconPath", "backgroundPath","soPath"} */ std::map<std::string, std::string> getPluginDetails(const std::string& rootPath, bool reset = false);