From ccbbfeb0a0ca268f528ae84b57e55156205ceb41 Mon Sep 17 00:00:00 2001 From: Alexei Arabadji Date: Wed, 10 Mar 2010 20:03:28 +0200 Subject: =?UTF-8?q?fixed=20EXT-5904=20=E2=80=9COffers=20embedding=20into?= =?UTF-8?q?=20IM=20windows=E2=80=9D,=20shortened=20timestamp=20of=20embedd?= =?UTF-8?q?ed=20offers;=20unified=20sender=20name=20of=20session=20message?= =?UTF-8?q?=20entry=20and=20file=20log=20entry=20for=20system=20messages;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --HG-- branch : product-engine --- indra/newview/llnotificationhandlerutil.cpp | 11 ++++++++--- 1 file 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); } -- cgit v1.2.3