diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2009-12-01 15:16:12 +0200 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2009-12-01 15:16:12 +0200 |
commit | ab5e6c93c927935943b7135a8e70dd50256e3c2e (patch) | |
tree | ebd18a459accdd2cee9e947a35a7b47dfe3d25b1 /indra | |
parent | d3ae1d909eba60471e79ae7e44eff0c3ce34b64a (diff) |
implemented EXT-2799 “Record to IM history notification about L$ payments by
other avatar”;
--HG--
branch : product-engine
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llnotificationhandlerutil.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 23 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 7 |
3 files changed, 32 insertions, 3 deletions
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 05da338513..857b7e9796 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -43,13 +43,14 @@ using namespace LLNotificationsUI; const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"), REVOKED_MODIFY_RIGHTS("RevokedModifyRights"), OBJECT_GIVE_ITEM( "ObjectGiveItem"), OBJECT_GIVE_ITEM_UNKNOWN_USER( - "ObjectGiveItemUnknownUser"); + "ObjectGiveItemUnknownUser"), PAYMENT_RECIVED("PaymentRecived"); // static bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) { return GRANTED_MODIFY_RIGHTS == notification->getName() - || REVOKED_MODIFY_RIGHTS == notification->getName(); + || REVOKED_MODIFY_RIGHTS == notification->getName() + || PAYMENT_RECIVED == notification->getName(); } // static 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. diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index cb0614797a..254c8a0f21 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4611,6 +4611,13 @@ Please select at least one type of content to search (PG, Mature, or Adult). <notification icon="notify.tga" + name="PaymentRecived" + type="notify"> +[MESSAGE] + </notification> + + <notification + icon="notify.tga" name="EventNotification" type="notify"> Event Notification: |