summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2010-11-24 00:51:28 -0800
committerMerov Linden <merov@lindenlab.com>2010-11-24 00:51:28 -0800
commitd7d23d16246e182c1cc74a57cac357aaa5c6c8e2 (patch)
treef3584e7e73a0986773e3369bf0ac3ee9e3dc6488 /indra/newview/llimview.cpp
parent744d23e3145eeca2c8db34b39cd1dc4bec24d3b1 (diff)
parentd8b426ee31ed7d37478f536bb1dfe9cc937b892b (diff)
Merge viewer-development
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 3578c98622..2922a4d654 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -279,9 +279,27 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
void LLIMModel::LLIMSession::onAdHocNameCache(const LLAvatarName& av_name)
{
- LLStringUtil::format_map_t args;
- args["[AGENT_NAME]"] = av_name.getCompleteName();
- LLTrans::findString(mName, "conference-title-incoming", args);
+ if (av_name.mIsDummy)
+ {
+ S32 separator_index = mName.rfind(" ");
+ std::string name = mName.substr(0, separator_index);
+ ++separator_index;
+ std::string conference_word = mName.substr(separator_index, mName.length());
+
+ // additional check that session name is what we expected
+ if ("Conference" == conference_word)
+ {
+ LLStringUtil::format_map_t args;
+ args["[AGENT_NAME]"] = name;
+ LLTrans::findString(mName, "conference-title-incoming", args);
+ }
+ }
+ else
+ {
+ LLStringUtil::format_map_t args;
+ args["[AGENT_NAME]"] = av_name.getCompleteName();
+ LLTrans::findString(mName, "conference-title-incoming", args);
+ }
}
void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction)
@@ -2165,7 +2183,7 @@ void LLIncomingCallDialog::processCallResponse(S32 response)
LLAvatarName av_name;
if (LLAvatarNameCache::get(caller_id, &av_name))
{
- correct_session_name = av_name.mDisplayName + " (" + av_name.mUsername + ")";
+ correct_session_name = av_name.getCompleteName();
correct_session_name.append(ADHOC_NAME_SUFFIX);
}
}