diff options
author | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-12-01 15:56:33 +0200 |
---|---|---|
committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-12-01 15:56:33 +0200 |
commit | 0699c41e7c951464f759f63f43f4dea2a85ba528 (patch) | |
tree | 674b0b00e36b58ee9c4973be37a7d1d2c5c05fb6 /indra/newview/llviewermessage.cpp | |
parent | b509e655bdb7d2ef8a6cc0d87f765626b6d5783f (diff) | |
parent | ab5e6c93c927935943b7135a8e70dd50256e3c2e (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 9fc818e1ff..a5e06e7cff 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -4347,7 +4347,28 @@ void process_money_balance_reply( LLMessageSystem* msg, void** ) // *TODO: Translate LLSD args; args["MESSAGE"] = desc; - LLNotificationsUtil::add("SystemMessage", args); + + // this is a marker to retrieve avatar name from server message: + // "<avatar name> paid you L$" + const std::string marker = "paid you L$"; + + // extract avatar name from system message + std::string name = desc.substr(0, desc.find(marker, 0)); + LLStringUtil::trim(name); + + // if name extracted and name cache contains avatar id send loggable notification + LLUUID from_id; + if(name.size() > 0 && gCacheName->getUUID(name, from_id)) + { + args["NAME"] = name; + LLSD payload; + payload["from_id"] = from_id; + LLNotificationsUtil::add("PaymentRecived", args, payload); + } + else + { + LLNotificationsUtil::add("SystemMessage", args); + } // Once the 'recent' container gets large enough, chop some // off the beginning. |