diff --git a/components/streams/src/feed.cpp b/components/streams/src/feed.cpp index 209977248d5ebe282f0127908e3b1fe056412429..694f2353d8a890642c2dcdb823cba28335f5120d 100644 --- a/components/streams/src/feed.cpp +++ b/components/streams/src/feed.cpp @@ -520,11 +520,18 @@ std::string Feed::getName(const std::string &puri) { if (uri.getScheme() == ftl::URI::SCHEME_FTL) { try { - auto n = net_->findOne<std::string>("get_cfg", puri); + auto *cfgble = ftl::config::find(puri); + if (cfgble) { + auto &j = cfgble->getConfig(); + return (j.is_structured()) ? j.value("name", j.value("uri", uri.getPathSegment(-1))) : uri.getPathSegment(-1); + } else { + return uri.getPathSegment(-1); + } + /*auto n = net_->findOne<std::string>("get_cfg", puri); if (n) { auto j = nlohmann::json::parse(*n); return (j.is_structured()) ? j.value("name", j.value("uri", uri.getPathSegment(-1))) : uri.getPathSegment(-1); - } + }*/ } catch (const ftl::exception &e) { e.ignore(); }