diff options
author | Mark Palange (Mani) <palange@lindenlab.com> | 2010-10-22 14:27:56 -0700 |
---|---|---|
committer | Mark Palange (Mani) <palange@lindenlab.com> | 2010-10-22 14:27:56 -0700 |
commit | b30a0b4bdb8493592ac918b1a8649d7dbb3bae51 (patch) | |
tree | 4688747aca7195cc996451cc4bd376bf1764eb4b /indra/newview/llnearbychat.cpp | |
parent | be1c9a867440e4306348887ce07c88ba6cd31241 (diff) | |
parent | d3f3dd0998ee8a2159a98d2d8b4b02dce6176252 (diff) |
merge
Diffstat (limited to 'indra/newview/llnearbychat.cpp')
-rw-r--r-- | indra/newview/llnearbychat.cpp | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp index 28aea7ae3d..f16cc4cef4 100644 --- a/indra/newview/llnearbychat.cpp +++ b/indra/newview/llnearbychat.cpp @@ -55,12 +55,6 @@ static const S32 RESIZE_BAR_THICKNESS = 3; -const static std::string IM_TIME("time"); -const static std::string IM_TEXT("message"); -const static std::string IM_FROM("from"); -const static std::string IM_FROM_ID("from_id"); - - LLNearbyChat::LLNearbyChat(const LLSD& key) : LLDockableFloater(NULL, false, false, key) ,mChatHistory(NULL) @@ -185,7 +179,7 @@ void LLNearbyChat::addMessage(const LLChat& chat,bool archive,const LLSD &args) if (gSavedPerAccountSettings.getBOOL("LogNearbyChat")) { - LLLogChat::saveHistory("chat", chat.mFromName, chat.mFromID, chat.mText); + LLLogChat::saveHistory("chat", chat); } } @@ -275,8 +269,12 @@ void LLNearbyChat::loadHistory() const LLSD& msg = *it; std::string from = msg[IM_FROM]; - LLUUID from_id = LLUUID::null; - if (msg[IM_FROM_ID].isUndefined()) + LLUUID from_id; + if (msg[IM_FROM_ID].isDefined()) + { + from_id = msg[IM_FROM_ID].asUUID(); + } + else { gCacheName->getUUID(from, from_id); } @@ -288,11 +286,14 @@ void LLNearbyChat::loadHistory() chat.mTimeStr = msg[IM_TIME].asString(); chat.mChatStyle = CHAT_STYLE_HISTORY; - chat.mSourceType = CHAT_SOURCE_AGENT; - if (from_id.isNull() && SYSTEM_FROM == from) + if (msg.has(IM_SOURCE_TYPE)) + { + S32 source_type = msg[IM_SOURCE_TYPE].asInteger(); + chat.mSourceType = (EChatSourceType)source_type; + } + else if (from_id.isNull() && SYSTEM_FROM == from) { chat.mSourceType = CHAT_SOURCE_SYSTEM; - } else if (from_id.isNull()) { |