summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/English.lproj/InfoPlist.strings4
-rw-r--r--indra/newview/Info-SecondLife.plist2
-rw-r--r--indra/newview/llimpanel.cpp217
-rw-r--r--indra/newview/llimpanel.h7
-rw-r--r--indra/newview/llimview.cpp205
-rw-r--r--indra/newview/llviewermenu.cpp19
-rw-r--r--indra/newview/llviewermessage.cpp79
-rw-r--r--indra/newview/llviewerregion.cpp4
8 files changed, 273 insertions, 264 deletions
diff --git a/indra/newview/English.lproj/InfoPlist.strings b/indra/newview/English.lproj/InfoPlist.strings
index 8fae01fbdc..9df6a820fb 100644
--- a/indra/newview/English.lproj/InfoPlist.strings
+++ b/indra/newview/English.lproj/InfoPlist.strings
@@ -1,5 +1,5 @@
/* Localized versions of Info.plist keys */
CFBundleName = "Second Life";
-CFBundleShortVersionString = "Second Life version 1.16.0.5";
-CFBundleGetInfoString = "Second Life version 1.16.0.5, Copyright 2004-2007 Linden Research, Inc.";
+CFBundleShortVersionString = "Second Life version 1.17.0.12";
+CFBundleGetInfoString = "Second Life version 1.17.0.12, Copyright 2004-2007 Linden Research, Inc.";
diff --git a/indra/newview/Info-SecondLife.plist b/indra/newview/Info-SecondLife.plist
index 764b1520f0..a02f664d54 100644
--- a/indra/newview/Info-SecondLife.plist
+++ b/indra/newview/Info-SecondLife.plist
@@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
- <string>1.16.0.5</string>
+ <string>1.17.0.12</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
diff --git a/indra/newview/llimpanel.cpp b/indra/newview/llimpanel.cpp
index 0484027455..a7c110fec4 100644
--- a/indra/newview/llimpanel.cpp
+++ b/indra/newview/llimpanel.cpp
@@ -13,6 +13,7 @@
#include "indra_constants.h"
#include "llfocusmgr.h"
#include "llfontgl.h"
+#include "llhttpclient.h"
#include "llrect.h"
#include "llerror.h"
#include "llstring.h"
@@ -40,6 +41,7 @@
#include "llvieweruictrlfactory.h"
#include "lllogchat.h"
#include "llfloaterhtml.h"
+#include "llviewerregion.h"
#include "llweb.h"
//
@@ -93,8 +95,7 @@ bool send_start_session_messages(const LLUUID& temp_session_id,
const LLDynamicArray<LLUUID>& ids,
EInstantMessage dialog)
{
- if ( (dialog == IM_SESSION_911_START) ||
- (dialog == IM_SESSION_GROUP_START) ||
+ if ( (dialog == IM_SESSION_GROUP_START) ||
(dialog == IM_SESSION_CONFERENCE_START) )
{
S32 count = ids.size();
@@ -109,7 +110,6 @@ bool send_start_session_messages(const LLUUID& temp_session_id,
switch(dialog)
{
case IM_SESSION_GROUP_START:
- case IM_SESSION_911_START:
gMessageSystem->addBinaryDataFast(_PREHASH_BinaryBucket,
EMPTY_BINARY_BUCKET,
EMPTY_BINARY_BUCKET_SIZE);
@@ -190,9 +190,8 @@ LLFloaterIMPanel::LLFloaterIMPanel(const std::string& name,
mSessionInitialized(FALSE),
mSessionInitRequested(FALSE)
{
- init(session_label);
-
mSessionInitialTargetIDs = ids;
+ init(session_label);
}
@@ -216,11 +215,33 @@ void LLFloaterIMPanel::init(const LLString& session_label)
(void *)this);
}
- if(IM_SESSION_911_START == mDialog)
+ if ( !mSessionInitialized )
{
- LLTextBox* live_help_text =
- LLUICtrlFactory::getTextBoxByName(this, "live_help_dialog");
- addHistoryLine(live_help_text->getText());
+ if ( !send_start_session_messages(
+ mSessionUUID,
+ mOtherParticipantUUID,
+ mSessionInitialTargetIDs,
+ mDialog) )
+ {
+ //we don't need to need to wait for any responses
+ //so we're already initialized
+ mSessionInitialized = TRUE;
+ }
+ else
+ {
+ //locally echo a little "starting session" message
+ LLUIString session_start = sSessionStartString;
+
+ session_start.setArg("[NAME]", getTitle());
+ mSessionStartMsgPos =
+ mHistoryEditor->getText().length();
+
+ bool log_to_file = false;
+ addHistoryLine(
+ session_start,
+ LLColor4::grey,
+ log_to_file);
+ }
}
}
@@ -235,7 +256,6 @@ BOOL LLFloaterIMPanel::postBuild()
requires("title_string", WIDGET_TYPE_TEXT_BOX);
requires("typing_start_string", WIDGET_TYPE_TEXT_BOX);
requires("session_start_string", WIDGET_TYPE_TEXT_BOX);
- requires("teleport_btn", WIDGET_TYPE_BUTTON);
if (checkRequirements())
{
@@ -253,16 +273,10 @@ BOOL LLFloaterIMPanel::postBuild()
LLButton* close_btn = LLUICtrlFactory::getButtonByName(this, "close_btn");
close_btn->setClickedCallback(&LLFloaterIMPanel::onClickClose, this);
- LLButton* tp_btn = LLUICtrlFactory::getButtonByName(this, "teleport_btn");
- tp_btn->setClickedCallback(&LLFloaterIMPanel::onTeleport, this);
- tp_btn->setVisible(FALSE);
- tp_btn->setEnabled(FALSE);
-
mHistoryEditor = LLViewerUICtrlFactory::getViewerTextEditorByName(this, "im_history");
mHistoryEditor->setParseHTML(TRUE);
- if (IM_SESSION_GROUP_START == mDialog
- || IM_SESSION_911_START == mDialog)
+ if (IM_SESSION_GROUP_START == mDialog)
{
profile_btn->setEnabled(FALSE);
}
@@ -308,55 +322,55 @@ void LLFloaterIMPanel::draw()
LLFloater::draw();
}
+class LLSessionInviteResponder : public LLHTTPClient::Responder
+{
+public:
+ LLSessionInviteResponder(const LLUUID& session_id)
+ {
+ mSessionID = session_id;
+ }
+
+ void error(U32 statusNum, const std::string& reason)
+ {
+ llinfos << "Error inviting all agents to session" << llendl;
+
+ //throw something back to the viewer here?
+ }
+
+private:
+ LLUUID mSessionID;
+};
-BOOL LLFloaterIMPanel::addParticipants(const LLDynamicArray<LLUUID>& ids)
+BOOL LLFloaterIMPanel::inviteToSession(const LLDynamicArray<LLUUID>& ids)
{
S32 count = ids.count();
if( isAddAllowed() && (count > 0) )
{
- llinfos << "LLFloaterIMPanel::addParticipants() - adding participants" << llendl;
- const S32 MAX_AGENTS = 50;
- if(count > MAX_AGENTS) return FALSE;
-
- LLMessageSystem *msg = gMessageSystem;
- msg->newMessageFast(_PREHASH_ImprovedInstantMessage);
- msg->nextBlockFast(_PREHASH_AgentData);
- msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
- msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
- msg->nextBlockFast(_PREHASH_MessageBlock);
- msg->addBOOLFast(_PREHASH_FromGroup, FALSE);
- msg->addUUIDFast(_PREHASH_ToAgentID, mOtherParticipantUUID);
- msg->addU8Fast(_PREHASH_Offline, IM_ONLINE);
- msg->addU8Fast(_PREHASH_Dialog, IM_SESSION_ADD);
- msg->addUUIDFast(_PREHASH_ID, mSessionUUID);
- msg->addU32Fast(_PREHASH_Timestamp, NO_TIMESTAMP); // no timestamp necessary
- std::string name;
- gAgent.buildFullname(name);
- msg->addStringFast(_PREHASH_FromAgentName, name);
- msg->addStringFast(_PREHASH_Message, LLString::null);
- msg->addU32Fast(_PREHASH_ParentEstateID, 0);
- msg->addUUIDFast(_PREHASH_RegionID, LLUUID::null);
- msg->addVector3Fast(_PREHASH_Position, gAgent.getPositionAgent());
+ llinfos << "LLFloaterIMPanel::inviteToSession() - adding participants" << llendl;
- // *FIX: this could suffer from endian issues
- S32 bucket_size = UUID_BYTES * count;
- U8* bucket = new U8[bucket_size];
- U8* pos = bucket;
- for(S32 i = 0; i < count; ++i)
+ std::string url =
+ gAgent.getRegion()->getCapability("ChatSessionRequest");
+
+ LLSD data;
+ data["params"] = LLSD::emptyArray();
+ for (int i = 0; i < count; i++)
{
- memcpy(pos, &(ids.get(i)), UUID_BYTES);
- pos += UUID_BYTES;
+ data["params"].append(ids.get(i));
}
- msg->addBinaryDataFast(_PREHASH_BinaryBucket,
- bucket,
- bucket_size);
- delete[] bucket;
- gAgent.sendReliableMessage();
+
+ data["method"] = "invite";
+ data["session-id"] = mSessionUUID;
+ LLHTTPClient::post(
+ url,
+ data,
+ new LLSessionInviteResponder(mSessionUUID));
+
}
else
{
- llinfos << "LLFloaterIMPanel::addParticipants() - no need to add agents for "
+ llinfos << "LLFloaterIMPanel::inviteToSession -"
+ << " no need to invite agents for "
<< mDialog << llendl;
// successful add, because everyone that needed to get added
// was added.
@@ -512,7 +526,7 @@ BOOL LLFloaterIMPanel::dropCallingCard(LLInventoryItem* item, BOOL drop)
{
LLDynamicArray<LLUUID> ids;
ids.put(item->getCreatorUUID());
- addParticipants(ids);
+ inviteToSession(ids);
}
}
else
@@ -548,7 +562,7 @@ BOOL LLFloaterIMPanel::dropCategory(LLInventoryCategory* category, BOOL drop)
{
ids.put(items.get(i)->getCreatorUUID());
}
- addParticipants(ids);
+ inviteToSession(ids);
}
}
return rv;
@@ -558,7 +572,7 @@ BOOL LLFloaterIMPanel::isAddAllowed() const
{
return ((IM_SESSION_CONFERENCE_START == mDialog)
- || (IM_SESSION_ADD) );
+ || (IM_SESSION_INVITE) );
}
@@ -592,39 +606,6 @@ void LLFloaterIMPanel::onClickClose( void* userdata )
}
}
-void LLFloaterIMPanel::addTeleportButton()
-{
- LLButton* btn =
- LLViewerUICtrlFactory::getButtonByName(this, "teleport_btn");
-
- if ( !btn->getEnabled() )
- {
- //it's required, don't need to check for null here
- // adjust the size of the editor to make room for the button
- LLRect rect = mInputEditor->getRect();
- S32 editor_right = rect.mRight - btn->getRect().getWidth();
- rect.mRight = editor_right;
- mInputEditor->reshape(rect.getWidth(), rect.getHeight(), FALSE);
- mInputEditor->setRect(rect);
-
- btn->setVisible(TRUE);
- btn->setEnabled(TRUE);
- }
-}
-
-// static
-void LLFloaterIMPanel::onTeleport(void* userdata)
-{
- LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
- if(self)
- {
- send_simple_im(self->mSessionUUID, //to
- "",
- IM_TELEPORT_911,
- self->mSessionUUID);//session
- }
-}
-
// static
void LLFloaterIMPanel::onInputEditorFocusReceived( LLUICtrl* caller, void* userdata )
{
@@ -672,7 +653,7 @@ void LLFloaterIMPanel::onClose(bool app_quitting)
name.c_str(),
"",
IM_ONLINE,
- IM_SESSION_DROP,
+ IM_SESSION_LEAVE,
mSessionUUID);
gAgent.sendReliableMessage();
}
@@ -697,11 +678,7 @@ void deliver_message(const std::string& utf8_text,
// which case it's probably an IM to everyone.
U8 new_dialog = dialog;
- if ( dialog == IM_SESSION_911_START )
- {
- new_dialog = IM_SESSION_911_SEND;
- }
- else if ( dialog != IM_NOTHING_SPECIAL )
+ if ( dialog != IM_NOTHING_SPECIAL )
{
new_dialog = IM_SESSION_SEND;
}
@@ -737,49 +714,6 @@ void LLFloaterIMPanel::sendMsg()
std::string utf8_text = wstring_to_utf8str(text);
utf8_text = utf8str_truncate(utf8_text, MAX_MSG_BUF_SIZE - 1);
- if ( !mSessionInitialized )
- {
- //we send requests (if we need to) to initialize our session
- if ( !mSessionInitRequested )
- {
- mSessionInitRequested = TRUE;
- if ( !send_start_session_messages(mSessionUUID,
- mOtherParticipantUUID,
- mSessionInitialTargetIDs,
- mDialog) )
- {
- //we don't need to need to wait for any responses
- //so we don't need to disable
- mSessionInitialized = TRUE;
- }
- else
- {
- //queue up the message to send once the session is
- //initialized
- mQueuedMsgsForInit.append(utf8_text);
-
- //locally echo a little "starting session" message
- LLUIString session_start = sSessionStartString;
-
- session_start.setArg("[NAME]", getTitle());
- mSessionStartMsgPos =
- mHistoryEditor->getText().length();
-
- bool log_to_file = false;
- addHistoryLine(session_start,
- LLColor4::grey,
- log_to_file);
-
- }
- }
- else
- {
- //queue up the message to send once the session is
- //initialized
- mQueuedMsgsForInit.append(utf8_text);
- }
- }
-
if ( mSessionInitialized )
{
deliver_message(utf8_text,
@@ -813,6 +747,10 @@ void LLFloaterIMPanel::sendMsg()
addHistoryLine(history_echo);
}
}
+ else
+ {
+ mQueuedMsgsForInit.append(utf8_text);
+ }
gViewerStats->incStat(LLViewerStats::ST_IM_COUNT);
}
@@ -951,3 +889,4 @@ void LLFloaterIMPanel::chatFromLogFile(LLString line, void* userdata)
self->mHistoryEditor->appendColoredText(line, false, true, LLColor4::grey);
}
+
diff --git a/indra/newview/llimpanel.h b/indra/newview/llimpanel.h
index 45dda8ec79..5348308a83 100644
--- a/indra/newview/llimpanel.h
+++ b/indra/newview/llimpanel.h
@@ -51,7 +51,7 @@ public:
// add target ids to the session.
// Return TRUE if successful, otherwise FALSE.
- BOOL addParticipants(const LLDynamicArray<LLUUID>& agent_ids);
+ BOOL inviteToSession(const LLDynamicArray<LLUUID>& agent_ids);
void addHistoryLine(const std::string &utf8msg,
const LLColor4& color = LLColor4::white,
@@ -78,10 +78,7 @@ public:
const LLUUID& getSessionID() const { return mSessionUUID; }
const LLUUID& getOtherParticipantID() const { return mOtherParticipantUUID; }
-
- // HACK -- for enabling a teleport button for helpers
- static void onTeleport(void* userdata);
- void addTeleportButton();
+ const EInstantMessage getDialogType() const { return mDialog; }
void sessionInitReplyReceived(const LLUUID& im_session_id);
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 553c6ec6c3..5a40b4a7c1 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -12,29 +12,37 @@
#include "llfontgl.h"
#include "llrect.h"
+#include "lldbstrings.h"
#include "llerror.h"
#include "llbutton.h"
+#include "llsdutil.h"
#include "llstring.h"
#include "linked_lists.h"
#include "llvieweruictrlfactory.h"
#include "llagent.h"
#include "llcallingcard.h"
+#include "llchat.h"
#include "llviewerwindow.h"
#include "llresmgr.h"
+#include "llfloaterchat.h"
#include "llfloaternewim.h"
+#include "llhttpclient.h"
#include "llhttpnode.h"
#include "llimpanel.h"
#include "llresizebar.h"
#include "lltabcontainer.h"
#include "viewer.h"
#include "llfloater.h"
+#include "llmutelist.h"
#include "llresizehandle.h"
#include "llkeyboard.h"
#include "llui.h"
#include "llviewermenu.h"
#include "llcallingcard.h"
#include "lltoolbar.h"
+#include "llviewermessage.h"
+#include "llviewerregion.h"
const EInstantMessage GROUP_DIALOG = IM_SESSION_GROUP_START;
const EInstantMessage DEFAULT_DIALOG = IM_NOTHING_SPECIAL;
@@ -129,11 +137,9 @@ BOOL LLFloaterIM::postBuild()
sErrorStringsMap["no_user_911"] =
childGetText("user_no_help");
- sEventStringsMap["add"] = childGetText("add_session_event");;
+ sEventStringsMap["add"] = childGetText("add_session_event");
sEventStringsMap["message"] =
- childGetText("message_session_event");;
- sEventStringsMap["teleport"] =
- childGetText("teleport_session_event");;
+ childGetText("message_session_event");
sForceCloseSessionMap["removed"] =
childGetText("removed_from_group");
@@ -357,10 +363,10 @@ void LLIMView::addMessage(
//if we have recently requsted to be dropped from a session
//but are still receiving messages from the session, don't make
//a new floater
-// if ( mSessionsDropRequested.has(session_id.asString()) )
-// {
-// return ;
-// }
+ if ( mSessionsDropRequested.has(session_id.asString()) )
+ {
+ return ;
+ }
const char* name = from;
if(session_name && (strlen(session_name)>1))
@@ -523,10 +529,10 @@ void LLIMView::removeSession(const LLUUID& session_id)
//mTabContainer->removeTabPanel(floater);
}
-// if ( session_id.notNull() )
-// {
-// mSessionsDropRequested[session_id.asString()] = LLSD();
-// }
+ if ( session_id.notNull() && floater->getDialogType() != IM_NOTHING_SPECIAL )
+ {
+ mSessionsDropRequested[session_id.asString()] = LLSD();
+ }
}
void LLIMView::refresh()
@@ -831,9 +837,10 @@ public:
desc.source(__FILE__, __LINE__);
}
- virtual void post(ResponsePtr response,
- const LLSD& context,
- const LLSD& input) const
+ virtual void post(
+ ResponsePtr response,
+ const LLSD& context,
+ const LLSD& input) const
{
LLSD body;
LLUUID temp_session_id;
@@ -847,8 +854,9 @@ public:
if ( success )
{
session_id = body["session_id"].asUUID();
- gIMView->updateFloaterSessionID(temp_session_id,
- session_id);
+ gIMView->updateFloaterSessionID(
+ temp_session_id,
+ session_id);
}
else
{
@@ -863,11 +871,11 @@ public:
sErrorStringsMap[body["error"].asString()];
args["[RECIPIENT]"] = floater->getTitle();
- gViewerWindow->alertXml("IMSessionStartError",
- args,
- onConfirmForceCloseError,
- floater);
-
+ gViewerWindow->alertXml(
+ "IMSessionStartError",
+ args,
+ onConfirmForceCloseError,
+ floater);
}
}
}
@@ -970,18 +978,163 @@ public:
}
};
+class LLViewerChatterBoxSessionAgentListUpdates : public LLHTTPNode
+{
+public:
+ virtual void post(
+ ResponsePtr responder,
+ const LLSD& context,
+ const LLSD& input) const
+ {
+ }
+};
+
+class LLViewerChatterBoxInvitation : public LLHTTPNode
+{
+public:
+ virtual void post(
+ ResponsePtr responder,
+ const LLSD& context,
+ const LLSD& input) const
+ {
+ if ( input["body"].has("instantmessage") )
+ {
+ LLSD message_params =
+ input["body"]["instantmessage"]["message_params"];
+
+ //this is just replicated code from process_improved_im
+ //and should really go in it's own function -jwolk
+ if (gNoRender)
+ {
+ return;
+ }
+
+ char buffer[DB_IM_MSG_BUF_SIZE * 2]; /* Flawfinder: ignore */
+ LLChat chat;
+
+ std::string message = message_params["message"].asString();
+ std::string name = message_params["from_name"].asString();
+ LLUUID from_id = message_params["from_id"].asUUID();
+ LLUUID session_id = message_params["id"].asUUID();
+ std::vector<U8> bin_bucket = message_params["data"]["binary_bucket"].asBinary();
+ U8 offline = (U8)message_params["offline"].asInteger();
+
+ time_t timestamp =
+ (time_t) message_params["timestamp"].asInteger();
+
+ BOOL is_busy = gAgent.getBusy();
+ BOOL is_muted = gMuteListp->isMuted(from_id, name);
+ BOOL is_linden = gMuteListp->isLinden(
+ name.c_str());
+ char separator_string[3]=": "; /* Flawfinder: ignore */
+ int message_offset=0;
+
+ //Handle IRC styled /me messages.
+ if (!strncmp(message.c_str(), "/me ", 4) ||
+ !strncmp(message.c_str(), "/me'", 4))
+ {
+ strcpy(separator_string,""); /* Flawfinder: ignore */
+ message_offset = 3;
+ }
+
+ chat.mMuted = is_muted && !is_linden;
+ chat.mFromID = from_id;
+ chat.mFromName = name;
+ if (!is_linden && is_busy)
+ {
+ return;
+ }
+
+ // standard message, not from system
+ char saved[MAX_STRING]; /* Flawfinder: ignore */
+ saved[0] = '\0';
+ if(offline == IM_OFFLINE)
+ {
+ char time_buf[TIME_STR_LENGTH]; /* Flawfinder: ignore */
+ snprintf(saved, /* Flawfinder: ignore */
+ MAX_STRING,
+ "(Saved %s) ",
+ formatted_time(timestamp, time_buf));
+ }
+ snprintf(
+ buffer,
+ sizeof(buffer),
+ "%s%s%s%s",
+ name.c_str(),
+ separator_string,
+ saved,
+ (message.c_str() + message_offset)); /*Flawfinder: ignore*/
+
+ BOOL is_this_agent = FALSE;
+ if(from_id == gAgentID)
+ {
+ from_id = LLUUID::null;
+ is_this_agent = TRUE;
+ }
+ gIMView->addMessage(
+ session_id,
+ from_id,
+ name.c_str(),
+ buffer,
+ (char*)&bin_bucket[0],
+ IM_SESSION_INVITE,
+ message_params["parent_estate_id"].asInteger(),
+ message_params["region_id"].asUUID(),
+ ll_vector3_from_sd(message_params["position"]));
+
+ snprintf(
+ buffer,
+ sizeof(buffer),
+ "IM: %s%s%s%s",
+ name.c_str(),
+ separator_string,
+ saved,
+ (message.c_str()+message_offset)); /* Flawfinder: ignore */
+ chat.mText = buffer;
+ LLFloaterChat::addChat(chat, TRUE, is_this_agent);
+
+ //if we succesfully accepted the invitation
+ //send a message back down
+
+ //TODO - When availble, have this response just be part
+ //of an automatic response system
+ std::string url = gAgent.getRegion()->getCapability(
+ "ChatSessionRequest");
+
+ if ( url != "" )
+ {
+ LLSD data;
+ data["method"] = "accept invitation";
+ data["session-id"] = input["body"]["session_id"];
+ LLHTTPClient::post(
+ url,
+ data,
+ NULL);
+ }
+ } //end if invitation has instant message
+ }
+};
+
LLHTTPRegistration<LLViewerIMSessionStartReply>
gHTTPRegistrationMessageImsessionstartreply(
- "/message/IMSessionStartReply");
+ "/message/ChatterBoxSessionStartReply");
LLHTTPRegistration<LLViewerIMSessionEventReply>
gHTTPRegistrationMessageImsessioneventreply(
- "/message/IMSessionEventReply");
+ "/message/ChatterBoxSessionEventReply");
LLHTTPRegistration<LLViewerForceCloseIMSession>
gHTTPRegistrationMessageForceCloseImSession(
- "/message/ForceCloseIMSession");
+ "/message/ForceCloseChatterBoxSession");
LLHTTPRegistration<LLViewerIMSessionDropReply>
gHTTPRegistrationMessageImSessionDropReply(
- "/message/IMSessionDropReply");
+ "/message/ChatterBoxSessionLeaveReply");
+
+LLHTTPRegistration<LLViewerChatterBoxSessionAgentListUpdates>
+ gHTTPRegistrationMessageChatterboxsessionagentlistupdates(
+ "/message/ChatterBoxSessionAgentListUpdates");
+
+LLHTTPRegistration<LLViewerChatterBoxInvitation>
+ gHTTPRegistrationMessageChatterBoxInvitation(
+ "/message/ChatterBoxInvitation");
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 1565a5875b..9aaac2af66 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -3010,24 +3010,6 @@ class LLHelpMOTD : public view_listener_t
}
};
-class LLHelpLiveHelp : public view_listener_t
-{
- bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
- {
- // the session_id of a 911 session will always be this agent's session id
- static LLUUID session_id(LLUUID::null);
- if (session_id.isNull())
- {
- session_id.generate();
- }
- gIMView->setFloaterOpen(TRUE);
- LLDynamicArray<LLUUID> members;
- members.put(gAgent.getID());
- gIMView->addSession("Help Request", IM_SESSION_911_START, session_id, members); //xui: translate
- return true;
- }
-};
-
//
// Major mode switching
//
@@ -7642,7 +7624,6 @@ void initialize_menus()
addMenu(new LLToolsVisibleTakeObject(), "Tools.VisibleTakeObject");*/
// Help menu
- addMenu(new LLHelpLiveHelp(), "Help.LiveHelp");
addMenu(new LLHelpMOTD(), "Help.MOTD");
// Self pie menu
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 9bcf1ccaee..3b28148c4f 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1691,86 +1691,23 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
}
break;
- case IM_SESSION_911_SEND:
+ case IM_SESSION_SEND:
{
- //this is just the same code as IM_SESSION_SEND for a bit
- //I was too lazy to make this a function....sorry - jwolk
if (!is_linden && is_busy)
{
return;
}
-
- // standard message, not from system
- char saved[MAX_STRING]; /* Flawfinder: ignore */
- saved[0] = '\0';
- if(offline == IM_OFFLINE)
- {
- char time_buf[TIME_STR_LENGTH]; /* Flawfinder: ignore */
- snprintf(saved, /* Flawfinder: ignore */
- MAX_STRING,
- "(Saved %s) ",
- formatted_time(timestamp, time_buf));
- }
-
- snprintf(buffer, /* Flawfinder: ignore */
- sizeof(buffer),
- "%s%s%s%s",
- name,
- separator_string,
- saved,
- (message+message_offset));
- BOOL is_this_agent = FALSE;
- if(from_id == gAgentID)
- {
- from_id = LLUUID::null;
- is_this_agent = TRUE;
- }
-
- gIMView->addMessage(
- session_id,
- from_id,
- name,
- buffer,
- (char*)binary_bucket,
- IM_SESSION_ADD,
- parent_estate_id,
- region_id,
- position);
-
- snprintf(buffer, sizeof(buffer), "IM: %s%s%s%s", name, separator_string, saved, (message+message_offset)); /* Flawfinder: ignore */
- chat.mText = buffer;
- LLFloaterChat::addChat(chat, TRUE, is_this_agent);
-
- //ok, now we want to add a teleport button if we are receving
- //a message from not ourself
- LLFloaterIMPanel* panel =
- gIMView->findFloaterBySession(session_id);
-
- if (panel && !is_this_agent )
- {
- //don't add a teleport button for yourself
- panel->addTeleportButton();
- }
- break;
- }
- case IM_SESSION_SEND:
- {
- if (!is_linden && is_busy)
+ // System messages, specifically "Foo Bar has left this session"
+ // are not shown unless you actually have that session open.
+ // Band-aid. JC
+ if (offline == IM_ONLINE
+ && chat.mFromName == SYSTEM_FROM
+ && !gIMView->hasSession(session_id))
{
return;
}
- // System messages, specifically "Foo Bar has left this session"
- // are not shown unless you actually have that session open.
- // Band-aid. JC
- if (offline == IM_ONLINE
- && chat.mFromName == SYSTEM_FROM
- && !gIMView->hasSession(session_id))
- {
- return;
- }
-
// standard message, not from system
char saved[MAX_STRING]; /* Flawfinder: ignore */
saved[0] = '\0';
@@ -1795,7 +1732,7 @@ void process_improved_im(LLMessageSystem *msg, void **user_data)
name,
buffer,
(char*)binary_bucket,
- IM_SESSION_ADD,
+ IM_SESSION_INVITE,
parent_estate_id,
region_id,
position);
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 6f68f04d67..6fd31f3e72 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1283,7 +1283,9 @@ void LLViewerRegion::setSeedCapability(const std::string& url)
capabilityNames.append("SendUserReportWithScreenshot");
capabilityNames.append("RequestTextureDownload");
capabilityNames.append("UntrustedSimulatorMessage");
-
+ capabilityNames.append("ParcelVoiceInfoRequest");
+ capabilityNames.append("ChatSessionRequest");
+
LLHTTPClient::post(url, capabilityNames, BaseCapabilitiesComplete::build(this));
}