diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2010-06-18 17:52:54 +0300 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2010-06-18 17:52:54 +0300 |
commit | 129da72326e0a314717652650ef6f4378d7794a0 (patch) | |
tree | 7bc2448a42b0f3b125ec9f0a3f53492f7d0f430c /indra/newview/llviewermessage.cpp | |
parent | 2c5af9672c8b531762475c752dd1904a4024ff67 (diff) |
EXT-6710 FIXED Corrected 'ItemsShared' notification message and provided logging of 'item shared' message instead of spawning IM session and add message to it.
Details:
1 Corrected 'ItemsShared' notification message.
2 Avoided spawning session on item shared event.
3 Provided logging of item shared message.
4 Provided logging of 'IMSystemMessageTip' notification without opened related IM session.
reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/612/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index d81fa5ee1c..bf4eb6ec33 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -1980,6 +1980,18 @@ static bool parse_lure_bucket(const std::string& bucket, return true; } +class LLPostponedIMSystemTipNotification: 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) @@ -2050,14 +2062,19 @@ void process_improved_im(LLMessageSystem *msg, void **user_data) LLSD args; LLSD payload; + LLNotification::Params params; + switch(dialog) { case IM_CONSOLE_AND_CHAT_HISTORY: - // *TODO: Translate args["MESSAGE"] = message; - payload["SESSION_NAME"] = name; + args["NAME"] = name; payload["from_id"] = from_id; - LLNotificationsUtil::add("IMSystemMessageTip",args, payload); + + params.name = "IMSystemMessageTip"; + params.substitutions = args; + params.payload = payload; + LLPostponedNotification::add<LLPostponedIMSystemTipNotification>(params, from_id, false); break; case IM_NOTHING_SPECIAL: |