diff options
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r-- | indra/newview/llimview.cpp | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 6c4af0522f..4780b51c55 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -158,7 +158,8 @@ LLIMModel::LLIMSession::LLIMSession(const LLUUID& session_id, const std::string& mSessionInitialized(false), mCallBackEnabled(true), mTextIMPossible(true), - mOtherParticipantIsAvatar(true) + mOtherParticipantIsAvatar(true), + mStartCallOnInitialize(false) { if (IM_NOTHING_SPECIAL == type || IM_SESSION_P2P_INVITE == type) { @@ -413,6 +414,12 @@ void LLIMModel::processSessionInitializedReply(const LLUUID& old_session_id, con { im_floater->sessionInitReplyReceived(new_session_id); } + + // auto-start the call on session initialization? + if (session->mStartCallOnInitialize) + { + gIMMgr->startCall(new_session_id); + } } //*TODO remove this "floater" stuff when Communicate Floater is gone @@ -995,18 +1002,6 @@ bool LLIMModel::sendStartSession( return false; } -// static -void LLIMModel::sendSessionInitialized(const LLUUID &session_id) -{ - LLIMSession* session = getInstance()->findIMSession(session_id); - if (session) - { - LLSD arg; - arg["session_id"] = session_id; - getInstance()->mSessionInitializedSignal(arg); - } -} - // // Helper Functions // @@ -1929,6 +1924,15 @@ BOOL LLIMMgr::getIMReceived() const return mIMReceived; } +void LLIMMgr::autoStartCallOnStartup(const LLUUID& session_id) +{ + LLIMModel::LLIMSession *session = LLIMModel::getInstance()->findIMSession(session_id); + if (session) + { + session->mStartCallOnInitialize = true; + } +} + LLUUID LLIMMgr::addP2PSession(const std::string& name, const LLUUID& other_participant_id, const std::string& voice_session_handle, |