diff options
| author | Rider Linden <rider@lindenlab.com> | 2026-07-23 14:17:48 -0700 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2026-07-23 14:58:16 -0700 |
| commit | 285e0a41b0ad676a7015a237dd828eb686da1c14 (patch) | |
| tree | a5c3ca8eff362a54af04a10a9b0df39ddcb62798 /indra/llinventory/llinventory.cpp | |
| parent | a6a2f98070cd55fcaadafc237bd0ffba9d466655 (diff) | |
Was not correctly parsing metadata from task inventory API, fix how I was using the cache control.
Diffstat (limited to 'indra/llinventory/llinventory.cpp')
| -rw-r--r-- | indra/llinventory/llinventory.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
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); |
