diff --git a/indra/newview/fschathistory.cpp b/indra/newview/fschathistory.cpp index d5a4d1d933..99e5f4b52e 100644 --- a/indra/newview/fschathistory.cpp +++ b/indra/newview/fschathistory.cpp @@ -791,6 +791,7 @@ void FSChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL LLFastTimer _(FTM_APPEND_MESSAGE); bool use_plain_text_chat_history = args["use_plain_text_chat_history"].asBoolean(); bool square_brackets = false; // square brackets necessary for a system messages + bool is_p2p = args.has("is_p2p") && args["is_p2p"].asBoolean(); bool from_me = chat.mFromID == gAgent.getID(); setPlainText(use_plain_text_chat_history); // FIRE-8600: TAB out of chat history @@ -1016,8 +1017,7 @@ void FSChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL } // names showing - if ( ((chat.mChatType == CHAT_TYPE_IM && args["show_names_for_p2p_conv"].asBoolean()) || - chat.mChatType != CHAT_TYPE_IM) && + if ( (!is_p2p || args["show_names_for_p2p_conv"].asBoolean()) && utf8str_trim(chat.mFromName).size() != 0) { // Don't hotlink any messages from the system (e.g. "Second Life:"), so just add those in plain text. diff --git a/indra/newview/fsfloaterim.cpp b/indra/newview/fsfloaterim.cpp index ddb72f3ce9..f36a8cfceb 100644 --- a/indra/newview/fsfloaterim.cpp +++ b/indra/newview/fsfloaterim.cpp @@ -1255,6 +1255,8 @@ void FSFloaterIM::updateMessages() LLIMModel::LLIMSession* pIMSession = LLIMModel::instance().findIMSession(mSessionID); RLV_ASSERT(pIMSession); + chat_args["is_p2p"] = pIMSession->isP2PSessionType(); + std::ostringstream message; std::list::const_reverse_iterator iter = messages.rbegin(); std::list::const_reverse_iterator iter_end = messages.rend(); @@ -1274,7 +1276,6 @@ void FSFloaterIM::updateMessages() chat.mFromName = from; chat.mTimeStr = time; chat.mChatStyle = is_history ? CHAT_STYLE_HISTORY : chat.mChatStyle; - chat.mChatType = pIMSession->isP2PSessionType() ? CHAT_TYPE_IM : CHAT_TYPE_NORMAL; // Bold group moderators' chat -KC // FS-1734 seperate name and text styles for moderator