From 285e0a41b0ad676a7015a237dd828eb686da1c14 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 23 Jul 2026 14:17:48 -0700 Subject: Was not correctly parsing metadata from task inventory API, fix how I was using the cache control. --- indra/llinventory/llinventory.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'indra/llinventory/llinventory.cpp') diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 1fcf70dc25..a7edc3a383 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -63,6 +63,7 @@ static const std::string INV_CREATION_DATE_LABEL("created_at"); static const std::string INV_TOGGLED_LABEL("toggled"); static const std::string INV_SCRIPT_LABEL("script"); static const std::string INV_RUNTIME_LABEL("runtime"); +static const std::string INV_METADATA_LABEL("metadata"); // key used by agent-inventory-service static const std::string INV_ASSET_TYPE_LABEL_WS("type_default"); @@ -1114,6 +1115,35 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) continue; } + if (i->first == INV_METADATA_LABEL) + { + // Server (non-AIS) exports thumbnail/favorite/script nested under + // a "metadata" wrapper; mirror the legacy-stream parser behavior. + const LLSD& metadata = i->second; + if (metadata.has(INV_THUMBNAIL_LABEL)) + { + const LLSD& thumbnail = metadata[INV_THUMBNAIL_LABEL]; + if (thumbnail.has(INV_ASSET_ID_LABEL)) + { + mThumbnailUUID = thumbnail[INV_ASSET_ID_LABEL].asUUID(); + } + } + if (metadata.has(INV_FAVORITE_LABEL)) + { + const LLSD& favorite = metadata[INV_FAVORITE_LABEL]; + if (favorite.has(INV_TOGGLED_LABEL)) + { + mFavorite = favorite[INV_TOGGLED_LABEL].asBoolean(); + } + } + if (metadata.has(INV_SCRIPT_LABEL) + && metadata[INV_SCRIPT_LABEL].has(INV_RUNTIME_LABEL)) + { + mRuntime = metadata[INV_SCRIPT_LABEL][INV_RUNTIME_LABEL].asString(); + } + continue; + } + if (i->first == INV_PERMISSIONS_LABEL) { mPermissions.importLLSD(i->second); -- cgit v1.3