diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llbottomtray.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llimview.h | 2 | ||||
-rw-r--r-- | indra/newview/llsyswellwindow.cpp | 8 |
4 files changed, 25 insertions, 2 deletions
diff --git a/indra/newview/llbottomtray.cpp b/indra/newview/llbottomtray.cpp index 4d5d416907..976b312509 100644 --- a/indra/newview/llbottomtray.cpp +++ b/indra/newview/llbottomtray.cpp @@ -148,6 +148,12 @@ void LLBottomTray::sessionAdded(const LLUUID& session_id, const std::string& nam { if (!getChicletPanel()) return; + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); + if (!session) return; + + // no need to spawn chiclets for participants in P2P calls called through Avaline + if (session->isP2P() && session->isOtherParticipantAvaline()) return; + if (getChicletPanel()->findChiclet<LLChiclet>(session_id)) return; LLIMChiclet* chiclet = createIMChiclet(session_id); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index d209060b58..3345f7d0bf 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -483,6 +483,17 @@ bool LLIMModel::LLIMSession::isAdHoc() return IM_SESSION_CONFERENCE_START == mType || (IM_SESSION_INVITE == mType && !gAgent.isInGroup(mSessionID)); } +bool LLIMModel::LLIMSession::isP2P() +{ + return IM_NOTHING_SPECIAL == mType; +} + +bool LLIMModel::LLIMSession::isOtherParticipantAvaline() +{ + return !mOtherParticipantIsAvatar; +} + + void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, const LLUUID& new_session_id) { LLIMSession* session = findIMSession(old_session_id); diff --git a/indra/newview/llimview.h b/indra/newview/llimview.h index 3f46b0d754..92caf0af9a 100644 --- a/indra/newview/llimview.h +++ b/indra/newview/llimview.h @@ -75,6 +75,8 @@ public: static void chatFromLogFile(LLLogChat::ELogLineType type, const LLSD& msg, void* userdata); bool isAdHoc(); + bool isP2P(); + bool isOtherParticipantAvaline(); LLUUID mSessionID; std::string mName; diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 8c6ea59407..3cddf6d902 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -743,9 +743,13 @@ BOOL LLIMWellWindow::postBuild() void LLIMWellWindow::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id) { - if (mMessageList->getItemByValue(session_id)) return; + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); + if (!session) return; + + // no need to spawn chiclets for participants in P2P calls called through Avaline + if (session->isP2P() && session->isOtherParticipantAvaline()) return; - if (!gIMMgr->hasSession(session_id)) return; + if (mMessageList->getItemByValue(session_id)) return; addIMRow(session_id, 0, name, other_participant_id); reshapeWindow(); |