Commits

leyla_linden  committed 139568a

DN-188 Fixed users with lastname residents not having inspectors in chat history

  • Participants
  • Parent commits 560faef

Comments (0)

Files changed (1)

File indra/llmessage/llcachename.cpp

 	}
 
 	std::string username = complete_name.substr(open_paren);
-	boost::regex complete_name_regex("( \\()([a-z0-9]+)(.[a-z]+)*(\\))");
-	boost::match_results<std::string::const_iterator> name_results;
-	if (!boost::regex_match(username, name_results, complete_name_regex)) return complete_name;
-
+	boost::regex complete_name_regex("( \\()([a-z0-9]+)(.[a-z]+)*(\\))");
+	boost::match_results<std::string::const_iterator> name_results;
+	if (!boost::regex_match(username, name_results, complete_name_regex)) return complete_name;
+
 	std::string legacy_name = name_results[2];
 	// capitalize the first letter
 	std::string cap_letter = legacy_name.substr(0, 1);
 	LLStringUtil::toUpper(cap_letter);
-	legacy_name = cap_letter + legacy_name.substr(1);
-
-	if (name_results[3].matched)
-	{
+	legacy_name = cap_letter + legacy_name.substr(1);
+
+	if (name_results[3].matched)
+	{
 		std::string last_name = name_results[3];
 		std::string cap_letter = last_name.substr(1, 1);
 		LLStringUtil::toUpper(cap_letter);
-		last_name = cap_letter + last_name.substr(2);
-		legacy_name = legacy_name + " " + last_name;
-	}
-	else
-	{
-		legacy_name = legacy_name + " Resident";
-	}
-
+		last_name = cap_letter + last_name.substr(2);
+		legacy_name = legacy_name + " " + last_name;
+	}
+
 	return legacy_name;
 }