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-enginemeow-7.2.2
parent
b2f6cab24f
commit
ccbbfeb0a0
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue