summaryrefslogtreecommitdiff
path: root/indra/newview/llgroupactions.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2009-12-21 17:28:06 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2009-12-21 17:28:06 -0500
commit97031cb90dce6ed8468e427abc09c99b290ee08d (patch)
tree11b5ceba8856d8535e219c5673c6d005285f2b75 /indra/newview/llgroupactions.cpp
parentced5b819d74fa70fc2050b13749bfe1387340583 (diff)
parenta32f857fe68f6b191f8029b1a5b137aaa364395b (diff)
merge
Diffstat (limited to 'indra/newview/llgroupactions.cpp')
-rw-r--r--indra/newview/llgroupactions.cpp30
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 =