diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2009-12-21 13:03:14 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2009-12-21 13:03:14 -0800 |
commit | 2f91768d96683515383570c8aae21bd126fd0ad6 (patch) | |
tree | 8c0a34f7e5aa4ae519d3c10e1c6fc8e9b83cb006 /indra/newview/llgroupactions.cpp | |
parent | d74d0d5c41d5ea114cef19aa7e54834d1c3b554b (diff) | |
parent | 0e6f0e5ca16f534ff14c57c77c323bed2d6e730c (diff) |
merge.
Diffstat (limited to 'indra/newview/llgroupactions.cpp')
-rw-r--r-- | indra/newview/llgroupactions.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/llgroupactions.cpp b/indra/newview/llgroupactions.cpp index ff75d461df..22658b4d65 100644 --- a/indra/newview/llgroupactions.cpp +++ b/indra/newview/llgroupactions.cpp @@ -119,6 +119,36 @@ void LLGroupActions::search() } // static +void LLGroupActions::startCall(const LLUUID& group_id) +{ + // create a new group voice session + LLGroupData gdata; + + if (!gAgent.getGroupData(group_id, gdata)) + { + llwarns << "Error getting group data" << llendl; + return; + } + + LLUUID session_id = gIMMgr->addSession(gdata.mName, IM_SESSION_GROUP_START, group_id, true); + if (session_id == LLUUID::null) + { + llwarns << "Error adding session" << llendl; + return; + } + + // start the call + // *TODO: move this to LLIMMgr? + LLIMModel::LLIMSession* session = LLIMModel::getInstance()->findIMSession(session_id); + if (session && session->mSessionInitialized) + gIMMgr->startCall(session_id); + else + gIMMgr->autoStartCallOnStartup(session_id); + + make_ui_sound("UISndStartIM"); +} + +// static void LLGroupActions::join(const LLUUID& group_id) { LLGroupMgrGroupData* gdatap = |