diff options
author | dolphin <dolphin@lindenlab.com> | 2013-10-22 10:51:53 -0700 |
---|---|---|
committer | dolphin <dolphin@lindenlab.com> | 2013-10-22 10:51:53 -0700 |
commit | 309ffd57fade231c3d14eedfe1171788e250f088 (patch) | |
tree | 61b6bfb1072bdb67b0399b90288525f647648a03 /indra/newview/llviewermessage.cpp | |
parent | 035eafb0c69c434c709862c816663f2b4ca2ab2b (diff) |
Post events on experience permission changes to refresh uis
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rwxr-xr-x | indra/newview/llviewermessage.cpp | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d7dffc5016..47644d2c6f 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6343,6 +6343,12 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) return false; } + LLUUID experience; + if(notification["payload"].has("experience")) + { + experience = notification["payload"]["experience"].asUUID(); + } + // check whether permissions were granted or denied BOOL allowed = TRUE; // the "yes/accept" button is the first button in the template, making it button 0 @@ -6351,7 +6357,17 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) { new_questions = 0; allowed = FALSE; - } + } + else if(experience.notNull()) + { + LLSD permission; + LLSD data; + permission["permission"]="Allow"; + + data[experience.asString()]=permission; + data["experience"]=experience; + LLEventPumps::instance().obtain("experience_permission").post(data); + } LLUUID task_id = notification["payload"]["task_id"].asUUID(); LLUUID item_id = notification["payload"]["item_id"].asUUID(); @@ -6381,7 +6397,7 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) if ( response["BlockExperience"] ) { - if(notification["payload"].has("experience")) + if(experience.notNull()) { LLViewerRegion* region = gAgent.getRegion(); if (!region) @@ -6394,8 +6410,11 @@ bool script_question_cb(const LLSD& notification, const LLSD& response) LLSD data; permission["permission"]="Block"; - data[notification["payload"]["experience"].asString()]=permission; + data[experience.asString()]=permission; LLHTTPClient::put(lookup_url, data, NULL); + + data["experience"]=experience; + LLEventPumps::instance().obtain("experience_permission").post(data); } } |