summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorAlexei Arabadji <aarabadji@productengine.com>2010-04-01 15:24:36 +0300
committerAlexei Arabadji <aarabadji@productengine.com>2010-04-01 15:24:36 +0300
commit4992eaf27dd113df805f347811882e72df6d7a86 (patch)
tree0b9dc91a785e4727be7f43b2ea20f2b38f24c4f2 /indra/newview/llviewermessage.cpp
parent91b28e42cb9ac68cb199eb8b39de90ab2249de24 (diff)
fixed EXT-2801 Record "object return" notification into IM history, not chat history,
* added class for LLPostponedNotification to rpovide possibility postpone adding notification to notifications system till sender avatar name will be received from cache name; * rolled back changes related to fix of EXT-4779; * avoided passing avatar id when logging 'Object Return' notification to nearby chat; eviewed by Vadim Savchuk at https://jira.secondlife.com/browse/EXT-6373 --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 3a5d701bc1..1426c0b9e2 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1685,6 +1685,18 @@ bool inspect_remote_object_callback(const LLSD& notification, const LLSD& respon
}
static LLNotificationFunctorRegistration inspect_remote_object_callback_reg("ServerObjectMessage", inspect_remote_object_callback);
+class LLPostponedServerObjectNotification: public LLPostponedNotification
+{
+protected:
+ /* virtual */
+ void modifyNotificationParams()
+ {
+ LLSD payload = mParams.payload;
+ payload["SESSION_NAME"] = mName;
+ mParams.payload = payload;
+ }
+};
+
void process_improved_im(LLMessageSystem *msg, void **user_data)
{
if (gNoRender)
@@ -2220,7 +2232,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
if(SYSTEM_FROM == name)
{
// System's UUID is NULL (fixes EXT-4766)
- chat.mFromID = from_id = LLUUID::null;
+ chat.mFromID = LLUUID::null;
}
LLSD query_string;
@@ -2266,13 +2278,16 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
payload["slurl"] = location;
payload["name"] = name;
std::string session_name;
- gCacheName->getFullName(from_id, session_name);
- payload["SESSION_NAME"] = session_name;
if (from_group)
{
payload["group_owned"] = "true";
}
- LLNotificationsUtil::add("ServerObjectMessage", substitutions, payload);
+
+ LLNotification::Params params("ServerObjectMessage");
+ params.substitutions = substitutions;
+ params.payload = payload;
+
+ LLPostponedNotification::add<LLPostponedServerObjectNotification>(params, from_id, false);
}
break;
case IM_FROM_TASK_AS_ALERT: