diff options
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r-- | indra/newview/llimview.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 21a3ddfd78..be719c0a78 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -451,17 +451,24 @@ bool LLIMModel::addToHistory(const LLUUID& session_id, const std::string& from, return true; } -bool LLIMModel::logToFile(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) +bool LLIMModel::logToFile(const std::string& session_name, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) { if (gSavedPerAccountSettings.getBOOL("LogInstantMessages")) { - std::string name = LLIMModel::getInstance()->getName(session_id); - if (name == LLStringUtil::null) - { - name = from; - } + LLLogChat::saveHistory(session_name, from, from_id, utf8_text); + return true; + } + else + { + return false; + } +} - LLLogChat::saveHistory(name, from, from_id, utf8_text); +bool LLIMModel::logToFile(const LLUUID& session_id, const std::string& from, const LLUUID& from_id, const std::string& utf8_text) +{ + if (gSavedPerAccountSettings.getBOOL("LogInstantMessages")) + { + LLLogChat::saveHistory(LLIMModel::getInstance()->getName(session_id), from, from_id, utf8_text); return true; } else |