summaryrefslogtreecommitdiff
path: root/indra/newview/llimview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llimview.cpp')
-rw-r--r--indra/newview/llimview.cpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 18d39b7aa4..0d2b1f06b5 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -41,7 +41,7 @@
#include "lltextutil.h"
#include "lltrans.h"
#include "lluictrlfactory.h"
-
+#include "llimconversation.h"
#include "llagent.h"
#include "llagentui.h"
#include "llappviewer.h"
@@ -907,7 +907,7 @@ const LLUUID& LLIMModel::getOtherParticipantID(const LLUUID& session_id) const
LLIMSession* session = findIMSession(session_id);
if (!session)
{
- llwarns << "session " << session_id << "does not exist " << llendl;
+ llwarns << "session " << session_id << " does not exist " << llendl;
return LLUUID::null;
}
@@ -2483,8 +2483,7 @@ void LLIMMgr::addSystemMessage(const LLUUID& session_id, const std::string& mess
LLChat chat(message);
chat.mSourceType = CHAT_SOURCE_SYSTEM;
- LLFloater* chat_bar = LLFloaterReg::getInstance("chat_bar");
- LLNearbyChat* nearby_chat = chat_bar->findChild<LLNearbyChat>("nearby_chat");
+ LLNearbyChat* nearby_chat = LLNearbyChat::getInstance();
if(nearby_chat)
{
@@ -2592,7 +2591,8 @@ LLUUID LLIMMgr::addSession(
const std::string& name,
EInstantMessage dialog,
const LLUUID& other_participant_id,
- const LLDynamicArray<LLUUID>& ids, bool voice)
+ const LLDynamicArray<LLUUID>& ids, bool voice,
+ const LLUUID& floater_id)
{
if (0 == ids.getLength())
{
@@ -2607,6 +2607,18 @@ LLUUID LLIMMgr::addSession(
LLUUID session_id = computeSessionID(dialog,other_participant_id);
+ if (floater_id.notNull())
+ {
+ LLIMFloater* im_floater = LLIMFloater::findInstance(floater_id);
+ if (im_floater && im_floater->getStartConferenceInSameFloater())
+ {
+ // The IM floater should be initialized with a new session_id
+ // so that it is found by that id when creating a chiclet in LLIMFloater::onIMChicletCreated,
+ // and a new floater is not created.
+ im_floater->initIMSession(session_id);
+ }
+ }
+
bool new_session = !LLIMModel::getInstance()->findIMSession(session_id);
//works only for outgoing ad-hoc sessions