summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
authorWilliam Todd Stinson <stinson@lindenlab.com>2012-10-16 12:23:15 -0700
committerWilliam Todd Stinson <stinson@lindenlab.com>2012-10-16 12:23:15 -0700
commita46d4ada3a2fe9ed8e5279e7d7e20d1ca485482c (patch)
tree3472c567b099034ee8ea13d34ccf89b41a6daccf /indra/newview/llimview.cpp
parent0ca59987843cfcaedb12592b9466567ef421c4e8 (diff)
parent5a22949cf509ebd1a3c7dfbd029b4bc188fee4a3 (diff)
Pull and merge from ssh://stinson@hg.lindenlab.com/richard/viewer-chui/.
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp22
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index b45903835a..115da54ec8 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -647,8 +647,6 @@ void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, con
{
mId2SessionMap.erase(old_session_id);
mId2SessionMap[new_session_id] = session;
-
- gIMMgr->notifyObserverSessionIDUpdated(old_session_id, new_session_id);
}
LLIMFloater* im_floater = LLIMFloater::findInstance(old_session_id);
@@ -657,6 +655,11 @@ void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, con
im_floater->sessionInitReplyReceived(new_session_id);
}
+ if (old_session_id != new_session_id)
+ {
+ gIMMgr->notifyObserverSessionIDUpdated(old_session_id, new_session_id);
+ }
+
// auto-start the call on session initialization?
if (session->mStartCallOnInitialize)
{
@@ -2650,10 +2653,17 @@ LLUUID LLIMMgr::addSession(
}
}
+ //Notify observers that a session was added
if (new_session)
{
LLIMModel::getInstance()->newSession(session_id, name, dialog, other_participant_id, ids, voice);
}
+ //Notifies observers that the session was already added
+ else
+ {
+ std::string session_name = LLIMModel::getInstance()->getName(session_id);
+ LLIMMgr::getInstance()->notifyObserverSessionActivated(session_id, session_name, other_participant_id);
+ }
//we don't need to show notes about online/offline, mute/unmute users' statuses for existing sessions
if (!new_session) return session_id;
@@ -2956,6 +2966,14 @@ void LLIMMgr::notifyObserverSessionAdded(const LLUUID& session_id, const std::st
}
}
+void LLIMMgr::notifyObserverSessionActivated(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id)
+{
+ for (session_observers_list_t::iterator it = mSessionObservers.begin(); it != mSessionObservers.end(); it++)
+ {
+ (*it)->sessionActivated(session_id, name, other_participant_id);
+ }
+}
+
void LLIMMgr::notifyObserverSessionVoiceOrIMStarted(const LLUUID& session_id)
{
for (session_observers_list_t::iterator it = mSessionObservers.begin(); it != mSessionObservers.end(); it++)