Using transaction_id instead of raw asset_id during aisv3 patch
parent
144eb1912d
commit
f878b032e8
|
|
@ -243,7 +243,7 @@ UpdateItemCommand::UpdateItemCommand(const LLUUID& item_id,
|
|||
setCommandFunc(cmd);
|
||||
}
|
||||
|
||||
UpdateCategoryCommand::UpdateCategoryCommand(const LLUUID& item_id,
|
||||
UpdateCategoryCommand::UpdateCategoryCommand(const LLUUID& cat_id,
|
||||
const LLSD& updates,
|
||||
LLPointer<LLInventoryCallback> callback):
|
||||
mUpdates(updates),
|
||||
|
|
@ -255,7 +255,7 @@ UpdateCategoryCommand::UpdateCategoryCommand(const LLUUID& item_id,
|
|||
llwarns << "No cap found" << llendl;
|
||||
return;
|
||||
}
|
||||
std::string url = cap + std::string("/category/") + item_id.asString();
|
||||
std::string url = cap + std::string("/category/") + cat_id.asString();
|
||||
LL_DEBUGS("Inventory") << "url: " << url << LL_ENDL;
|
||||
LLCurl::ResponderPtr responder = this;
|
||||
LLSD headers;
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ private:
|
|||
class UpdateCategoryCommand: public AISCommand
|
||||
{
|
||||
public:
|
||||
UpdateCategoryCommand(const LLUUID& item_id,
|
||||
UpdateCategoryCommand(const LLUUID& cat_id,
|
||||
const LLSD& updates,
|
||||
LLPointer<LLInventoryCallback> callback);
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -1253,6 +1253,12 @@ void update_inventory_item(
|
|||
if (AISCommand::isAPIAvailable())
|
||||
{
|
||||
LLSD updates = update_item->asLLSD();
|
||||
// Replace asset_id with transaction_id (hash_id)
|
||||
if (updates.has("asset_id"))
|
||||
{
|
||||
updates.erase("asset_id");
|
||||
updates["hash_id"] = update_item->getTransactionID();
|
||||
}
|
||||
LLPointer<AISCommand> cmd_ptr = new UpdateItemCommand(item_id, updates, cb);
|
||||
ais_ran = cmd_ptr->run_command();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue