diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2010-03-10 20:03:28 +0200 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2010-03-10 20:03:28 +0200 |
commit | ccbbfeb0a0ca268f528ae84b57e55156205ceb41 (patch) | |
tree | dca8461f43ba205dff95f2ea28f80ca3dd57109e /indra/newview/llnotificationhandlerutil.cpp | |
parent | b2f6cab24f9cf9edf9b33d0f0f59ca4dab1fb209 (diff) |
fixed EXT-5904 “Offers embedding into IM windows”,
shortened timestamp of embedded offers;
unified sender name of session message entry and file log entry for system messages;
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llnotificationhandlerutil.cpp')
-rw-r--r-- | indra/newview/llnotificationhandlerutil.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp index 554b67c47d..1f08756859 100644 --- a/indra/newview/llnotificationhandlerutil.cpp +++ b/indra/newview/llnotificationhandlerutil.cpp @@ -208,6 +208,12 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type, const std::string& message, const LLUUID& session_owner_id, const LLUUID& from_id) { + std::string from = from_name; + if (from_name.empty()) + { + from = SYSTEM_FROM; + } + LLUUID session_id = LLIMMgr::computeSessionID(session_type, session_owner_id); LLIMModel::LLIMSession* session = LLIMModel::instance().findIMSession( @@ -215,7 +221,6 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type, if (session == NULL) { // replace interactive system message marker with correct from string value - std::string from = from_name; if (INTERACTIVE_SYSTEM_FROM == from_name) { from = SYSTEM_FROM; @@ -231,7 +236,7 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type, // set searched session as active to avoid IM toast popup LLIMModel::instance().setActiveSessionID(session_id); - LLIMModel::instance().addMessage(session_id, from_name, from_id, + LLIMModel::instance().addMessage(session_id, from, from_id, message); // restore active session id @@ -378,7 +383,7 @@ void LLHandlerUtil::addNotifPanelToIM(const LLNotificationPtr& notification) offer["notification_id"] = notification->getID(); offer["from_id"] = notification->getPayload()["from_id"]; offer["from"] = name; - offer["time"] = LLLogChat::timestamp(true); + offer["time"] = LLLogChat::timestamp(false); offer["index"] = (LLSD::Integer)session->mMsgs.size(); session->mMsgs.push_front(offer); } |