summaryrefslogtreecommitdiff
path: root/indra/newview/llnearbychat.cpp
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-06-02 15:21:46 -0700
committerJames Cook <james@lindenlab.com>2010-06-02 15:21:46 -0700
commitb34eee98d1cd542777a9fc28b1e1d2e3a0de24e5 (patch)
treecdb7fb124ce9867b6cd54a2d57a1380cb45e6841 /indra/newview/llnearbychat.cpp
parenta282ffedf444462b71f5abc7aeac47768e7344e7 (diff)
DEV-50451 Fix names in local chat history loading, again
Switch to new serialization format, change filename so old viewers don't get confused if the user switches back. Reviewed with Richard
Diffstat (limited to 'indra/newview/llnearbychat.cpp')
-rw-r--r--indra/newview/llnearbychat.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/indra/newview/llnearbychat.cpp b/indra/newview/llnearbychat.cpp
index 74ede67c97..631d1fcac7 100644
--- a/indra/newview/llnearbychat.cpp
+++ b/indra/newview/llnearbychat.cpp
@@ -62,12 +62,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)
@@ -211,7 +205,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);
}
}
@@ -318,11 +312,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())
{