DN-190 Last name resident shown in title of IM Conference Window with no Display name

meow-7.2.2
Leyla Farazha 2010-10-27 15:22:39 -07:00
parent e98eff02ae
commit 360ce3d667
2 changed files with 12 additions and 14 deletions

View File

@ -257,23 +257,19 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string&
// history files have consistent (English) names in different locales.
if (isAdHocSessionType() && IM_SESSION_INVITE == type)
{
// Name here has a form of "<Avatar's name> Conference"
// Lets update it to localize the "Conference" word. See EXT-8429.
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);
}
LLAvatarNameCache::get(mOtherParticipantID,
boost::bind(&LLIMModel::LLIMSession::onAdHocNameCache,
this, _2));
}
}
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);
}
void LLIMModel::LLIMSession::onVoiceChannelStateChanged(const LLVoiceChannel::EState& old_state, const LLVoiceChannel::EState& new_state, const LLVoiceChannel::EDirection& direction)
{
std::string you_joined_call = LLTrans::getString("you_joined_call");

View File

@ -100,6 +100,8 @@ public:
void onAvatarNameCache(const LLUUID& avatar_id, const LLAvatarName& av_name);
void onAdHocNameCache(const LLAvatarName& av_name);
//*TODO make private
static std::string generateHash(const std::set<LLUUID>& sorted_uuids);