Proper fix for names not showing in nearby chat
parent
52a90b42aa
commit
8ee8dc362c
|
|
@ -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); // <FS:Zi> 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.
|
||||
|
|
|
|||
|
|
@ -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<LLSD>::const_reverse_iterator iter = messages.rbegin();
|
||||
std::list<LLSD>::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:HG> FS-1734 seperate name and text styles for moderator
|
||||
|
|
|
|||
Loading…
Reference in New Issue