From e8a24001aab959916786891c7aa9d36dbfd92553 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 23 Jun 2017 15:55:03 +0200 Subject: [PATCH] FIRE-21298: Emotes ignoring display name setting if using V5 style chat history --- indra/llui/llurlentry.cpp | 4 +++- indra/newview/fschathistory.cpp | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/indra/llui/llurlentry.cpp b/indra/llui/llurlentry.cpp index efea8c9ef0..bc8803637e 100644 --- a/indra/llui/llurlentry.cpp +++ b/indra/llui/llurlentry.cpp @@ -897,7 +897,9 @@ LLUrlEntryAgentDisplayName::LLUrlEntryAgentDisplayName() std::string LLUrlEntryAgentDisplayName::getName(const LLAvatarName& avatar_name) { - return avatar_name.getDisplayName(true); + // Don't force a display name if display names are disabled + //return avatar_name.getDisplayName(true); + return avatar_name.getDisplayName(); } // diff --git a/indra/newview/fschathistory.cpp b/indra/newview/fschathistory.cpp index c74c2371d7..8d5c27f3c2 100644 --- a/indra/newview/fschathistory.cpp +++ b/indra/newview/fschathistory.cpp @@ -1334,7 +1334,10 @@ void FSChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL { if (chat.mSourceType == CHAT_SOURCE_AGENT) { - std::string name_format = "completename"; + static LLCachedControl useDisplayNames(gSavedSettings, "UseDisplayNames"); + static LLCachedControl nameTagShowUsernames(gSavedSettings, "NameTagShowUsernames"); + + std::string name_format = (useDisplayNames && nameTagShowUsernames) ? "completename" : "displayname"; if (is_local && gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) { name_format = "rlvanonym";