From c0b7c93c18783d6a426cf43265f34c86bdeceb4a Mon Sep 17 00:00:00 2001 From: James Cook Date: Thu, 4 Feb 2010 20:38:40 -0800 Subject: Converted all gCacheName->getName to getFullName for SLID compatibility Also eliminated notification "ObjectGiveItemUnknownUser" because the SLURL-based name lookup will always retrieve the user name. Fixed a bug with ObjectGiveItem where the SLURL would be incorrect for a group. --- indra/newview/llnotificationhandlerutil.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'indra/newview/llnotificationhandlerutil.cpp') diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index b8e0892b02..4d1a8fcb04 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -45,8 +45,8 @@ 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"), PAYMENT_RECIVED("PaymentRecived"), + "ObjectGiveItem"), + PAYMENT_RECIVED("PaymentRecived"), ADD_FRIEND_WITH_MESSAGE("AddFriendWithMessage"), USER_GIVE_ITEM("UserGiveItem"), INVENTORY_ACCEPTED("InventoryAccepted"), @@ -157,8 +157,7 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_fi "SESSION_NAME") ? notification->getPayload()["SESSION_NAME"].asString() : name; // don't create IM p2p session with objects, it's necessary condition to log - if (notification->getName() != OBJECT_GIVE_ITEM && notification->getName() - != OBJECT_GIVE_ITEM_UNKNOWN_USER) + if (notification->getName() != OBJECT_GIVE_ITEM) { LLUUID from_id = notification->getPayload()["from_id"]; -- cgit v1.2.3 From e14a641619afc9948b590c2caf8df8df02bdbfe3 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 16 Feb 2010 17:18:36 -0800 Subject: DEV-46234 Group Invite contains SLID with Resident, and DEV-46231 Pay resident notification contains SLID with Resident last name, and DEV-46232 Payment confirmation of buy and sell parcel of land contains SLID with Resident in both notifications Clean up server-side name strings with regex matching. Reviewed with Simon. --- indra/newview/llnotificationhandlerutil.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'indra/newview/llnotificationhandlerutil.cpp') diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 4d1a8fcb04..9c60483416 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -46,7 +46,9 @@ using namespace LLNotificationsUI; const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"), REVOKED_MODIFY_RIGHTS("RevokedModifyRights"), OBJECT_GIVE_ITEM( "ObjectGiveItem"), - PAYMENT_RECIVED("PaymentRecived"), + PAYMENT_RECEIVED("PaymentReceived"), + PAYMENT_RECEIVED_FOR("PaymentReceivedFor"), + PAYMENT_SENT("PaymentSent"), ADD_FRIEND_WITH_MESSAGE("AddFriendWithMessage"), USER_GIVE_ITEM("UserGiveItem"), INVENTORY_ACCEPTED("InventoryAccepted"), @@ -63,7 +65,9 @@ bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) { return GRANTED_MODIFY_RIGHTS == notification->getName() || REVOKED_MODIFY_RIGHTS == notification->getName() - || PAYMENT_RECIVED == notification->getName() + || PAYMENT_RECEIVED == notification->getName() + || PAYMENT_RECEIVED_FOR == notification->getName() + || PAYMENT_SENT == notification->getName() || OFFER_FRIENDSHIP == notification->getName() || FRIENDSHIP_OFFERED == notification->getName() || SERVER_OBJECT_MESSAGE == notification->getName() -- cgit v1.2.3 From be58f87ebb20bc2ef0057cb787b52fb279a702c3 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 30 Mar 2010 11:53:40 -0700 Subject: Remove some notifications eliminated in merge --- indra/newview/llnotificationhandlerutil.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llnotificationhandlerutil.cpp') diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index ef9bc2afc5..b5e0d998fe 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -116,8 +116,8 @@ const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"), REVOKED_MODIFY_RIGHTS("RevokedModifyRights"), OBJECT_GIVE_ITEM( "ObjectGiveItem"), PAYMENT_RECEIVED("PaymentReceived"), - PAYMENT_RECEIVED_FOR("PaymentReceivedFor"), - PAYMENT_SENT("PaymentSent"), +// PAYMENT_RECEIVED_FOR("PaymentReceivedFor"), +// PAYMENT_SENT("PaymentSent"), ADD_FRIEND_WITH_MESSAGE("AddFriendWithMessage"), USER_GIVE_ITEM("UserGiveItem"), INVENTORY_ACCEPTED("InventoryAccepted"), @@ -139,8 +139,8 @@ bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) return GRANTED_MODIFY_RIGHTS == notification->getName() || REVOKED_MODIFY_RIGHTS == notification->getName() || PAYMENT_RECEIVED == notification->getName() - || PAYMENT_RECEIVED_FOR == notification->getName() - || PAYMENT_SENT == notification->getName() +// || PAYMENT_RECEIVED_FOR == notification->getName() +// || PAYMENT_SENT == notification->getName() || OFFER_FRIENDSHIP == notification->getName() || FRIENDSHIP_OFFERED == notification->getName() || FRIENDSHIP_ACCEPTED == notification->getName() -- cgit v1.2.3 From 831dd9ca40f199f2a9e89eee56d12e217ced0cc4 Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 30 Apr 2010 17:32:27 -0700 Subject: Partial display name support in money transaction notifications --- indra/newview/llnotificationhandlerutil.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llnotificationhandlerutil.cpp') diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index b5e0d998fe..cd859c9cb8 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -116,8 +116,7 @@ const static std::string GRANTED_MODIFY_RIGHTS("GrantedModifyRights"), REVOKED_MODIFY_RIGHTS("RevokedModifyRights"), OBJECT_GIVE_ITEM( "ObjectGiveItem"), PAYMENT_RECEIVED("PaymentReceived"), -// PAYMENT_RECEIVED_FOR("PaymentReceivedFor"), -// PAYMENT_SENT("PaymentSent"), + PAYMENT_SENT("PaymentSent"), ADD_FRIEND_WITH_MESSAGE("AddFriendWithMessage"), USER_GIVE_ITEM("UserGiveItem"), INVENTORY_ACCEPTED("InventoryAccepted"), @@ -139,8 +138,7 @@ bool LLHandlerUtil::canLogToIM(const LLNotificationPtr& notification) return GRANTED_MODIFY_RIGHTS == notification->getName() || REVOKED_MODIFY_RIGHTS == notification->getName() || PAYMENT_RECEIVED == notification->getName() -// || PAYMENT_RECEIVED_FOR == notification->getName() -// || PAYMENT_SENT == notification->getName() + || PAYMENT_SENT == notification->getName() || OFFER_FRIENDSHIP == notification->getName() || FRIENDSHIP_OFFERED == notification->getName() || FRIENDSHIP_ACCEPTED == notification->getName() -- cgit v1.2.3 From 0789897d6127637f2b5f99d8e107fbd3df577173 Mon Sep 17 00:00:00 2001 From: Leyla Farazha Date: Wed, 2 Jun 2010 16:31:05 -0700 Subject: removed "SESSION_NAME" in favor of doing a gCacheName lookup reviewed by James --- indra/newview/llnotificationhandlerutil.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'indra/newview/llnotificationhandlerutil.cpp') diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 2ca2df152b..deb0cb6cfa 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -321,34 +321,35 @@ void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification) logToIMP2P(notification, false); } +void log_name_callback(const std::string& full_name, const std::string& from_name, + const std::string& message, const LLUUID& from_id) + +{ + LLHandlerUtil::logToIM(IM_NOTHING_SPECIAL, full_name, from_name, message, + from_id, LLUUID()); +} + // static void LLHandlerUtil::logToIMP2P(const LLNotificationPtr& notification, bool to_file_only) { - const std::string name = LLHandlerUtil::getSubstitutionName(notification); - - const std::string& session_name = notification->getPayload().has( - "SESSION_NAME") ? notification->getPayload()["SESSION_NAME"].asString() : name; - // don't create IM p2p session with objects, it's necessary condition to log if (notification->getName() != OBJECT_GIVE_ITEM) { LLUUID from_id = notification->getPayload()["from_id"]; - //there still appears a log history file with weird name " .txt" - if (" " == session_name || "{waiting}" == session_name || "{nobody}" == session_name) + if (from_id.isNull()) { - llwarning("Weird session name (" + session_name + ") for notification " + notification->getName(), 666) + llwarns << " from_id for notification " << notification->getName() << " is null " << llendl; + return; } if(to_file_only) { - logToIM(IM_NOTHING_SPECIAL, session_name, "", notification->getMessage(), - LLUUID(), LLUUID()); + gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, "", notification->getMessage(), LLUUID())); } else { - logToIM(IM_NOTHING_SPECIAL, session_name, INTERACTIVE_SYSTEM_FROM, notification->getMessage(), - from_id, LLUUID()); + gCacheName->get(from_id, false, boost::bind(&log_name_callback, _2, INTERACTIVE_SYSTEM_FROM, notification->getMessage(), from_id)); } } } -- cgit v1.2.3