Skip to content

Commit b29770e

Browse files
#3051 fix for Group notices get logged into wrong file
1 parent 4c968a8 commit b29770e

File tree

3 files changed

+19
-4
lines changed

3 files changed

+19
-4
lines changed

indra/newview/lllogchat.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,11 @@ bool LLLogChat::isTranscriptFileFound(std::string fullname)
894894
return result;
895895
}
896896

897+
std::string LLLogChat::getGroupChatSuffix()
898+
{
899+
return GROUP_CHAT_SUFFIX;
900+
}
901+
897902
//*TODO mark object's names in a special way so that they will be distinguishable form avatar name
898903
//which are more strict by its nature (only firstname and secondname)
899904
//Example, an object's name can be written like "Object <actual_object's_name>"

indra/newview/lllogchat.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ class LLLogChat : public LLSingleton<LLLogChat>
127127
static bool isAdHocTranscriptExist(std::string file_name);
128128
static bool isTranscriptFileFound(std::string fullname);
129129

130+
static std::string getGroupChatSuffix();
131+
130132
bool historyThreadsFinished(LLUUID session_id);
131133
LLLoadHistoryThread* getLoadHistoryThread(LLUUID session_id);
132134
LLDeleteHistoryThread* getDeleteHistoryThread(LLUUID session_id);

indra/newview/llnotificationhandlerutil.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,18 @@ void LLHandlerUtil::logToIM(const EInstantMessage& session_type,
9292
from = SYSTEM_FROM;
9393
}
9494

95-
// Build a new format username or firstname_lastname for legacy names
96-
// to use it for a history log filename.
97-
std::string user_name = LLCacheName::buildUsername(session_name);
98-
LLIMModel::instance().logToFile(user_name, from, from_id, message);
95+
std::string file_name;
96+
if (session_type == IM_SESSION_GROUP_START)
97+
{
98+
file_name = session_name + LLLogChat::getGroupChatSuffix();
99+
}
100+
else
101+
{
102+
// Build a new format username or firstname_lastname for legacy names
103+
// to use it for a history log filename.
104+
file_name = LLCacheName::buildUsername(session_name);
105+
}
106+
LLIMModel::instance().logToFile(file_name, from, from_id, message);
99107
}
100108
else
101109
{

0 commit comments

Comments
 (0)